andrewcroberts Posted August 1, 2014 Share Posted August 1, 2014 (edited) Hi all, Is there any way of stopping the layered navigation block from automatically scrolling to the top of the products? Since it happens after each filter, it becomes a tad irritating. I've had a quick sift through the blocklayered.js file but nothing is immediately obvious. Thanks Edited August 1, 2014 by andrewcroberts (see edit history) Link to comment Share on other sites More sharing options...
linaslp Posted September 17, 2014 Share Posted September 17, 2014 Same for me I would like to disable scroll or make it go to the top of the page. I can't find the code in JS which makes this scrolling.. Link to comment Share on other sites More sharing options...
andrewcroberts Posted September 17, 2014 Author Share Posted September 17, 2014 Same for me I would like to disable scroll or make it go to the top of the page. I can't find the code in JS which makes this scrolling.. I managed to solve the issue for myself. My theme has a js file under "/themes/themename/js/modules/blocklayered" called "blocklayered.js" I found this in amongst the code: if(slideUp) $.scrollTo('.product_list', 400); updateProductUrl(); I just commented it out with /* and */ and it seems to have stopped scrolling. Hopefully you have something similar, and this info can help you. (A quick use of the find tool looking for 'scroll' helped me.) Regards, Andrew Link to comment Share on other sites More sharing options...
bbgun91 Posted June 13, 2016 Share Posted June 13, 2016 (edited) if(slideUp) $.scrollTo('.product_list', 400); updateProductUrl(); I just commented it out with /* and */ and it seems to have stopped scrolling. Thank you very much for your reply andrewcroberts! Even if i already tried it and it didn't work for me, at least it gave me a hint to comfort myself on where to modify. I actually noticed that for me, it would continue to scroll to the .product_list or having random scroll to around there.... What actually worked for me was to replace : $.scrollTo('.product_list', 400); by $.scrollTo('body', 0); // brings to the top of the page instantly. I hope it can help. Cheers. Edited June 13, 2016 by bbgun91 (see edit history) Link to comment Share on other sites More sharing options...
PF22 Posted July 20, 2016 Share Posted July 20, 2016 Hi there. I have exactly this opposite problem ! I want me layered module to automatically scroll up to top of page when a user is selecting a new category, but it don't! Any help? I try to modify the scrollTo but I think it is not used when teh user is only selecting a checkbox. Any help? Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts