LindaTL Posted July 14, 2021 Share Posted July 14, 2021 Hello, I have right now pagination at the bottom of almost all category pages, when I click on the second or next page in the pagination, the new page stays at the bottom. Could someone please tell me how can I fix this so the page automatically go to the top after you switch the pages using pagination? Thanks in advanced. Link to comment Share on other sites More sharing options...
ComGrafPL Posted July 14, 2021 Share Posted July 14, 2021 1 hour ago, LindaTL said: Hello, I have right now pagination at the bottom of almost all category pages, when I click on the second or next page in the pagination, the new page stays at the bottom. Could someone please tell me how can I fix this so the page automatically go to the top after you switch the pages using pagination? Thanks in advanced. Solution for you: 1 Link to comment Share on other sites More sharing options...
LindaTL Posted July 14, 2021 Author Share Posted July 14, 2021 2 hours ago, ComGrafPL said: Solution for you: Thank you very much, it has worked! (Version: 1.7.6.8) If someone else has the same problem, this was the code I used: $( '#products' ).on( 'click', '.js-search-link', function( event ) { var target = $( "#header" ); if ( target.length ) { event.preventDefault(); $( 'html, body' ).animate( { scrollTop: target.offset().top+300 }, 1000 ); } }); It was written at the bottom of the file: code.js Found in: /httpdocs/themes/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now