Forums

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

Home Forums JavaScript Parallax count up scrolling

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41276
    maxisix
    Participant

    Hello, i’am trying to use a parallax scrolling plugin to creat something like this http://www.hispanicsatnbcu.com/part3.html . The hardest part is to increment the number like the one on the computer ( http://cl.ly/image/2j2P3k2s0l10 ). Do you guys having any ideas ? :/

    #116973
    tommaitland
    Member

    To me the easiest way would be to get the scroll value and put it through an algorithm to display that text, then write the text on window scroll. As it scrolls down the text can increment up until a max of 57% or however much. Something like:

    $(window).scroll( function() {
    var waypointPosition = 500;
    var scroll = $.scrollTop();
    scroll = scroll – waypointPosition;
    if (scroll > 57) { scroll = 57; }
    $(‘#percentage’).text(‘%’ + scroll);
    });

    I haven’t tested it so that might not work – but could give you some ideas.

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