javascript - iPad Popping Back to Page Top on Scroll -
i using wordpress, bootstrap, , skrollr
. have skrollr
disabled on mobile using following code:
var myskrollrfunction = function () { var windowwidth = $(window).width(); // initialize skrollr if window width large enough if (windowwidth > 1024) { skrollr.init({ forceheight: false, smoothscrolling: true, mobilecheck: function() { //hack - forces mobile version off return false; } }); } // disable skrollr if window resized below 768px wide if (windowwidth <= 1024) { skrollr.init().destroy(); // skrollr.init() returns singleton created above } };
i not using bootstrap scrollspy
, have not implicitly disabled it. main issue if stop scrolling in middle of disabled skrollr
element, pops top pretty consistently. otherwise, happens randomly.
since relatively new wordpress, not sure if wordpress problem, skrollr issue, or bootstrap issue. how prevent scroll-to-top behavior on mobile devices?
Comments
Post a Comment