Skip to content

Instantly share code, notes, and snippets.

@cjheath
Created May 11, 2011 07:48
Show Gist options
  • Save cjheath/966071 to your computer and use it in GitHub Desktop.
Save cjheath/966071 to your computer and use it in GitHub Desktop.
object.flash3times = function() {
object.attr({fill: "#FF0"});
var times = 3;
var flashMore = function() {
// Make it go dim:
object.attr({fill: "#CC0"});
if (--times > 0)
setTimeout(function() {
object.attr({fill: "#FF0"});
setTimeout(flashMore, 1000);
},
2000
);
}
setTimeout(flashMore, 2000);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment