WordPress.org

Ready to get started?Download WordPress

Forums

Progress Bar
[resolved] Start animation based on scroll? (6 posts)

  1. designbylukie
    Member
    Posted 1 year ago #

    Hey was hoping for some help! I notice the progress bar animates on page load, I have a single page website and the progress bars are out of view I wanted to ask if it would be possible for the progress bars to animate upon scrolling down to them?

    Thanks, Luke

    http://wordpress.org/extend/plugins/progress-bar/

  2. Chris Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    I can't think of anything that would trigger the animation when you scroll down to it, but that doesn't mean it isn't possible. It would likely take some jQuery/js magic, which isn't my forte, I'm afraid.

  3. designbylukie
    Member
    Posted 1 year ago #

    Thanks for your reply Chris, there is stuff out there I just do not understand it enough!!

  4. Chris Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    NP. It may be possible to do something similar with an infinite scroll function, so the progress bars don't actually load until you scroll to it.

    http://www.infinite-scroll.com/

    ...or something like lazy loading (but, again, I wouldn't know how to go about implementing lazy loading without digging into it heavily)...

    http://www.appelsiini.net/projects/lazyload

    Infinite scroll would probably be easier to implement in your theme if you were going to go either of these routes yourself.

  5. Nayume
    Member
    Posted 1 year ago #

    You might want to take a look at the jQuery Sonar plugin:

    https://github.com/artzstudio/jQuery-Sonar

    I'm trying to do the same thing with my progress bars and the sonar plugin is used on lazy load wp plugins. All you have to do is bind their event to the wppb when the document is ready (instead of animating) and then, when the event is called, unbind it and animate.

    Pretty simple concept. Might be worth de shot.

  6. Chris Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    @Nayume

    Thanks for the link. I'll take a peek.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.