jQuery Tabs and Back to Top
-
I am using jQuery Tabs and I have links on another page linking to the third tab. Although I have managed to get this working, the link takes you to the bottom of the page as opposed to the top (something to do with the jQuery Tabs hiding content to show it in the tabs). Anyway…
I can’t get a CSS fix to work so was trying to get a jQuery fix. My jQuery is not the best and was hoping for some help. This is what I have so far. Alert is working but I suspect page up is happening before I go to the new page.jQuery( function($) { 'use strict'; $('a#form-link').click(function() { alert("Hello! I am an alert box!!"); $('html, body').animate({ scrollTop: 0 }, 0); });
});
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘jQuery Tabs and Back to Top’ is closed to new replies.