-
-
Hello,
I am using slider revolution inside a couple of the Visual Composer tabs. However when selecting the tab, the slider is all skewed and won’t play at first. See next post for example screenshots and links.
I read that this is due to a resizing problem with revolution slider (I read this on the codecanyon comments but the post is 3 years a go):
“You need to use the API’s to stop the slider if the tab is closed, and to start the slider if the tab is opened. Also after opening the tab (after the tab animation) please trigger the Browser Resize event via jQuery so the slider recognise he need to redraw itself.”
Their fix was to:
“So you will need to make a bit of code which checks the class of your tab. Most tab adds a “opened” or “active” class if it is activated. Let say your tab called ”.tab1” than you do something like this:
jQuery('.tab1').click(function() { if (jQuery(this).hasClass('active') { setTimeout(function() { revapi4.resume(); jQuery(window).trigger("resize"); },500); } else { revapi4.revpause() } }
The problem with this is the tab that is clicked on has no class or id. Even though it says the ID is 4ferr5443 is in visual composer, its not the id for the tab. So I suspect this is why it isn’t working. I tried adding a class to the tab shortcode but it didn’t work.
Code I have added:
<script type=”text/javascript”>
jQuery(‘#4ferr5443’).click(function(){
if (jQuery(this).hasClass(‘active’) {
setTimeout(function() {
revapi6.resume();
jQuery(window).trigger(“resize”);
},200);
} else {
revapi6.revpause()
}
}
</script>Is there any way to get this working in tabs?
Thanks in advance for your help!
-
-
Please disregard this support post! I found a working solution at:
https://www.themepunch.com/faq/visual-composer-tabs-tour-accordion-and-pageable-container/
I just didnt find it before when searching around. Hopefully this helps others :).
-
Darn it I spoke too soon. Doesn’t look to have solved my issue when it should. I will keep investigating.
-
Hello,
I checked your site, but the slider opens up well in the tab. I also made a test on our side and the issue does not happen.
Did you manage to fix your issue? Let us know how we can help you.Best regards!
-
Hi Mihaila,
Thanks for your reply.
Yes the issue is still happening unfortunately. Haven’t found a way to fix it yet. You might have to clear your browser cache/cookies and try viewing it again. Do note it only occurs on other tabs so not the first tab already loaded with the page, only 2nd, 3rd etc tabs after you click on it.
Try in chrome and click “Option 2” straight away.
-
Hi Mihaila,
I wanted to ask, is the reason the below solution isn’t working:
https://www.themepunch.com/faq/visual-composer-tabs-tour-accordion-and-pageable-container/
Is it because the Visual Composer class names for the tabs are different in this theme? I was having trouble finding the same thing in the code.
For example:
// buttons to listen for
var classes = ‘.vc_tta-tabs-list .vc_tta-tab,’ +
‘.vc_pagination .vc_pagination-item,’ +
‘.vc_tta-panel’; -
Hi,
Just seeing if there was any progress at looking into this issue? The fix from themepunch is meant to work so I suspect a theme conflict issue. If it can’t be fixed I won’t be able to use tabs for my sliders.
-
Hello,
Sorry for the late reply.
What browser are you using to access it? This doe snot happen on our side, so i need your wp credentials in a private reply, to give it a closer look.Best regards!
-
You must be logged in to reply to this topic.