Forked from ramzesimus/JS: Progress bars animation
Last active
August 29, 2015 14:06
-
-
Save ssbalakumar/23b5fa851f2e7e7afb88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Animation Progress Bars | |
$("[data-appear-progress-animation]").each(function() { | |
var $this = $(this); | |
$this.appear(function() { | |
var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); | |
if(delay > 1) $this.css("animation-delay", delay + "ms"); | |
$this.addClass($this.attr("data-appear-animation")); | |
setTimeout(function() { | |
$this.animate({ | |
width: $this.attr("data-appear-progress-animation") | |
}, 1500, "easeOutQuad", function() { | |
$this.find(".progress-bar-tooltip").animate({ | |
opacity: 1 | |
}, 500, "easeOutQuad"); | |
}); | |
}, delay); | |
}, {accX: 0, accY: -50}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment