Skip to content Skip to sidebar Skip to footer

Jquery Show & Scrolltop (or Scrollto)

Just as the topic says I'm trying to get a link to open a hidden div then scroll to it. I have the first part taken care of. As for the scrollTop or ScrollTo function I've been try

Solution 1:

Simple example, no plugins:

http://jsfiddle.net/wr2sj/2/

$("#a").click(function() {
    $('html, body').animate({
        scrollTop: $("#b").offset().top
    });
    returnfalse;
});

Post a Comment for "Jquery Show & Scrolltop (or Scrollto)"