scroll position after clicking project thumbnail grid category filter
-
hello,
i'm not sure if this is a bug or the current functionality. when clicking on a category in the filter bar in a project thumbnail grid, is there any way to make the page scroll up to the top? when clicking on a filter option at the bottom of the page, the newly filtered results load, the page is smaller due to this, and the user if stuck at the very bottom [desktop view recommended to see this, the mobile is still in progress of being built] link
-
wow, amazing website!
i seeso the filter bar usually is not fixed and at the bottom. usually its at the top! this is some custom css you used for fix this at the bottom.
so usually you wouldn't need the scroll to top!
you can put this in lay options → custom <head> content:<script> jQuery(document).on("click", ".lay-thumbnailgrid-filter>*", function(event) { window.scrollTo({ top: 0, behavior: 'smooth' }) }); </script>
-
@arminunruh ahhh yes i did not think about the default position for the filter being static at the top, that would explain why this function isn't included! lol my apologies, thank you for taking the time to look and for the script recommendation! i'm super excited about this one :)
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it