Jump to content

Layered Navigation Block - Auto Scroll to Products


Recommended Posts

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 by andrewcroberts (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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

  • 1 year later...

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 by bbgun91 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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

×
×
  • Create New...