First, checkout Animate.css
Don't continue until you've checked it out. Go, go now.
Now, consider actually using this, you do: $('#button').addClass('pulse')
This css class uses modern css3 for all it's magic, but flat out won't work (to my knowledge) on older browsers.
What we need here is the ability to have some javascript hook when we do .addClass('pulse')
and .removeClass('pulse')
The syntax for these getter/setters might look like this:
$.classHook('pulse').onAdd(function(){
//if ie, perform fallback
});
$.classHook('pulse').onRemove(function(){
//if ie, perform fallback
});
What do you think?