Forums

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

Home Forums JavaScript jQuery animation flickers during scroll (Please Help)

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41612
    Rugg
    Participant

    Hello Everyone,

    There seems to be a few glitches with some jquery I’m working with. I’ve attempted a fix…having no luck. Hopefully the experts here can provide some assistance. Thank you.

    **Problem**
    The animation flickers/stutters when scrolling the page too fast or at a continuous rate.

    **Attempted Fix**
    Added .stop() to prevent animation queue buildup _Failed to solve the issue_

    **Goal**
    Prevent the flicker/stutter during excessive scrolling

    **Sample**
    http://jsfiddle.net/Sg8JQ/147/embedded/result/

    #119348
    TreeRoot
    Participant

    I didn’t experience a flicker with your example. Perhaps you need to throttle your scrolling event so that it doesn’t fire too often. Take a look at this to learn more about throttling:
    http://benalman.com/projects/jquery-throttle-debounce-plugin/

    #119350
    DustinWoods
    Member

    Add this:

    return false;

    to the last line of _scrollThis()_. When you use mousewheel, you need to return false if you don’t want the user’s action to actually move the scrollbar. What’s happening in your code, is when the user scrolls the mouse wheel, the scrollbar is moving _and_ your javascript is firing. You just want your javascript to fire and ignore the native behavior.

    #119384
    DustinWoods
    Member

    @NSR, Yep! You got it! That should work.

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