Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ssbalakumar/23b5fa851f2e7e7afb88 to your computer and use it in GitHub Desktop.
Save ssbalakumar/23b5fa851f2e7e7afb88 to your computer and use it in GitHub Desktop.
// 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