Skip to content

Instantly share code, notes, and snippets.

@ramzesimus
Created March 13, 2014 01:36
Show Gist options
  • Save ramzesimus/9520377 to your computer and use it in GitHub Desktop.
Save ramzesimus/9520377 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