Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - smooth scrolling event

0 votes
added Apr 16 in jQuery by LC Marshal Captain (22,730 points)
edited Apr 17 by LC Marshal
$(".floating-bar a[href^='#']").click(function(e) {
    var position = $($(this).attr("href")).offset().top;

    $("body, html").animate({
    scrollTop: position
    } /* speed */ );

Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.