May 4, 201016 yr Hi, I am designing a one page website, vertically and have 'Back to top' buttons, which I have used some JQuery on to create a nice scroll back to the top of the page. I would now like to implement this function for the main menu, so clicking portfolio will scroll down to the porfolio section nicely. Can anyone help with this? Is there a way to midify the script I have? Thanks $(document).ready(function() { $('a[href=#top]').click(function(){ $('html, body').animate({scrollTop:0}, 'slow'); return false; }); }); EDIT: Found the answer in the end here: http://blog.adriantomic.se/post/75671123/jquery-localscroll-tutorial Edited May 4, 201016 yr by welshhuw
Create an account or sign in to comment