not sure if you are aware of this but their is a "switchClass" script in jQueryUI. It also includes a duration so the switch can act as animation. You could analyze code from there to adapt to yours

http://jqueryui.com/demos/switchClass/

intrinsi wrote:
I have created a plugin called replaceClass, found at
http://plugins.jquery.com/project/replaceClass. However, this works
only on hover and I would like to broaden the trigger to include more
events. Also, it would be nice to work with id's as well. Any help is
appreciated and I am happy to move the code to a site like github if
that helps.

But more importantly, I wonder if this functionality already exists in
jQuery. I created the plugin (my first, btw) because I could not find
a built-in way to achieve class replacement on hover.

(Btw, I posted this today in the jQuery Plugins groups, but it appears
to be dormant.)

  

Reply via email to