Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Created September 18, 2010 05:14
Show Gist options
  • Save typeoneerror/585382 to your computer and use it in GitHub Desktop.
Save typeoneerror/585382 to your computer and use it in GitHub Desktop.
$.fn.startWebkitAnimation = function(name)
{
var element = $(this);
if (!element.hasClass(name))
{
element.addClass(name);
}
else
{
element.css("-webkit-animation-name", "none");
setTimeout(function() {
element.css("-webkit-animation-name", name);
}, 0);
}
return $(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment