-
AuthorPosts
-
January 12, 2015 at 7:52 pm #181627
John SParticipantHi,
I added both tab navs and accordions to different areas on a webpage to try them out for content options.
I set everything up properly.
When I test them as a user on the actual website, the page jumps or auto scrolls up or down when the items are clicked on.
This does not seem like natural behavior as it will scroll the information in the tabs and accordion out of sight.Needless to say, I would like the title area of the accordion to remain still and just the contents within the accordion to drop down. No movement (other than the drop down and change of tab item) when the user clicks on a tab nav or accordion.
Any ideas?
January 13, 2015 at 7:25 am #181952
ChristopherModeratorHi there,
Please add the following code under Customize -> Custom -> Java Script :
jQuery(document).ready(function($) { $('.x-accordion-toggle').click(function() { var $adminbarHeight = $('#wpadminbar').outerHeight(); var $navbarHeight = $('.x-navbar').outerHeight(); var $this = $(this); setTimeout(function() { $('html, body').animate({ scrollTop: $this.offset().top - $adminbarHeight - $navbarHeight + 1 }, 400) }, 300) }); });To fix tabs add this as well :
jQuery(function($){ $('.x-nav-tabs-item a').on('click', function(){ $('html,body').stop().animate({ scrollTop: $( $(this).attr('href') ).offset().top - $('.x-navbar').height() },700 ,'swing'); }); });Hope it helps.
January 13, 2015 at 3:54 pm #182305
NCPMRParticipantHello. Sorry to bear some bad news, I just pasted these in and I’m still having issues 🙁
https://drive.google.com/file/d/0B_RjEO4O9yNMZXhUaXF6QVU4YzQ/view?usp=sharing – I’ll try to keep this up here for a while.
January 14, 2015 at 7:01 am #182735
ChristopherModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
January 14, 2015 at 7:25 am #182757
microartsParticipantHi, same thing happens to me with the tab nav. if you click on the tabs on the page below, it just keeps scrolling down about 50px or so
January 14, 2015 at 11:33 am #182962
NCPMRParticipantThis reply has been marked as private.January 14, 2015 at 3:33 pm #183148
microartsParticipantany update on this?
January 14, 2015 at 3:39 pm #183152
RadModeratorHi NCPMR,
I tried this code and it makes the the scrolling stop.
jQuery(document).ready(function($) { $('.x-accordion-toggle, .x-nav-tabs-item a').click(function(e) { $('html, body').stop(); }); });Or do you wish the scrolling still enabled?
@Microarts, could you try this code too?Thanks guys!
January 14, 2015 at 3:41 pm #183156
microartsParticipantyes, that works for me! thanks 🙂
January 15, 2015 at 3:43 am #183500
RubinKeymasterYou’re welcome!
January 16, 2015 at 2:35 pm #184685
NCPMRParticipantYep thats great! Thanks, +1 for X Support 🙂
January 17, 2015 at 8:07 pm #185343
RadModeratorYou’re soo much welcome! 😉
January 19, 2015 at 7:34 pm #186492
kaczorroParticipantHelped me as well, thanks support team!
January 20, 2015 at 6:13 am #186804
ChristopherModeratorYou’re welcome.
March 14, 2015 at 6:51 am #227122
Ulrich MParticipantHi there,
unfortunately this fix doesn’t work for me. I’m using three tabs in a tab navigation and it’s still jumping back to the top, like a #top.
I’m already using another fix for the tab navigation combined with sliders from this thread https://theme.co/x/member/forums/topic/issue-with-image-slider-in-a-2-column-tabbed-setup/#post-227114
I tried to combine the JS code but also just used this solution alone.
What else could be wrong?
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-181627 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
