Skip to content

Instantly share code, notes, and snippets.

@casparkleijne
Created May 31, 2010 09:22
Show Gist options
  • Select an option

  • Save casparkleijne/419686 to your computer and use it in GitHub Desktop.

Select an option

Save casparkleijne/419686 to your computer and use it in GitHub Desktop.
/** toggles between classes Normal & Hover on any element that has one of those classes
it is a replacement for the :hover pseudo-class (so quite useless nowadays ;) **/
$(".Normal, .Hover").bind("mouseenter mouseleave", function ()
$(this).toggleClass("Hover Normal");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment