Tagged: x
-
AuthorPosts
-
May 20, 2016 at 9:20 pm #1002490
Rue NelModeratorHello There,
I went ahead and edited the JS code. The final code is this:
jQuery(document).ready(function($) { var $adminbarHeight = $('#wpadminbar').outerHeight(); var $navbarFixedTopHeight = $('.x-navbar-fixed-top-active .x-navbar').outerHeight(); var locHref = location.href; var locHashIndex = locHref.indexOf('#'); var locHash = locHref.substr(locHashIndex); if(locHash.length > 0){ console.log('hashed:' + scrollToPosition); console.log($(locHash).offset().top); $('html,body').animate({scrollTop: $(locHash ).offset().top - ($navbarFixedTopHeight +1) }, 700, function(){ window.location.hash = "" +locHash; // This hash change will jump the page to the top of the div with the same id // so we need to force the page to back to the end of the animation $('html,body').animate({ 'scrollTop': $(locHash ).offset().top - ($navbarFixedTopHeight +1) }, 0); }); } });Hope this would work out for you.
May 22, 2016 at 1:56 pm #1004069
logogloParticipantFinally! thanks, its working perfectly! thanks for putting the time into this guys.
May 22, 2016 at 2:00 pm #1004071
RupokMemberYou are welcome!
Glad that it helped. Feel free to let us know if you face any other issue. We’ll be happy to assist you.
Thanks for using X.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-866551 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
