Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Scroll to top slider

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #28893
    amorz
    Participant

    Hi all,

    I got stuck at the moment with a scroll to top slider, It slides fine but when i click the scroll to top div it’s stay on top and i can’t scrll down

    can someone help me out?

    amorz

    Code:
    var amorzScroll = null;

    $(window).scroll(function () {
    var scrollTop = $(document).scrollTop();
    scrollTop = parseInt(scrollTop);

    var offset = amorzScroll+scrollTop+”px”;
    $(“#toplink”).animate({top:offset},{duration:700,queue:false});

    $(‘#toplink’).click(
    function (e) {
    $(‘html, body’).animate({scrollTop: ‘0px’}, 800);
    }
    );
    });

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.