Tagged: x
-
AuthorPosts
-
June 30, 2016 at 4:00 am #1066421
auldreekieParticipantI’ve added tabs to a page, but when a tab is clicked the whole page scrolls up and down. I’d like to prevent this from happening.
I’ve tried all the custom Javascript solutions suggested by X Support in various other support topics, but nothing works.
All relevant plugins are up to date.
Can you help?
June 30, 2016 at 4:02 am #1066423
auldreekieParticipantThis reply has been marked as private.June 30, 2016 at 3:01 pm #1067238
Nabeel AModeratorHi there,
Thanks for writing in! Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery( function($) { $('.vc_tta-tab a').on('click', function( e ){ setTimeout( function() { $('html, body').stop().stop(); console.log('scrolling stopped'); }, 100 ); }); });strong>Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
July 1, 2016 at 3:11 am #1068081
auldreekieParticipantThat works perfectly.
Thanks for the great support 🙂
July 1, 2016 at 5:24 am #1068166
Rue NelModeratorHello There,
Thanks for letting us know that it has been useful to you.
Cheers.July 11, 2016 at 3:01 pm #1082033
auldreekieParticipantQuick follow up on this – tabbed content is still scrolling in tablet/mobile view.
Is there a similar chunk of jquery to prevent this too?
July 11, 2016 at 11:11 pm #1082582
RupokMemberHi there,
You can try updating the code a bit :
jQuery( function($) { $('.vc_tta-tab a').off('touchstart touchend').on('click', function( e ){ setTimeout( function() { $('html, body').stop().stop(); console.log('scrolling stopped'); }, 100 ); }); });Hope this helps.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1066421 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
