Remove active classes / Close all tabs in mobile
-
I am trying to remove active classes from the tabs in mobile view. Because when there are many tabs you have to scroll to the bottom of the first tab content to see other tab titles. It would be better for the user to get an overview of all the tabs and then select what tab to open.
In short I need to close all tabs in the responsive mobile view.
This is my attempted script to override opening first tab and its content by default.<script type=”text/javascript”>
(function($) {
if ($(window).width() < 760) {
jQuery(“.vc-tabs-li:nth-of-type(1)”).removeClass(“active”);
jQuery(“.ctu-ultimate-style-heading-2:nth-of-type(1)”).removeClass(“active”);
jQuery(“.ctu-ulitate-style-2-tabs:nth-of-type(1)”).hide();
jQuery(“.ctu-ultimate-style-heading-2:first”).removeClass(“active”);
jQuery(“.ctu-ulimate-style-2 .vc-tabs-li:first”).removeClass(“active”)}
})(jQuery);
</script>The page I need help with: [log in to see the link]
- The topic ‘Remove active classes / Close all tabs in mobile’ is closed to new replies.