Created
June 25, 2013 07:52
-
-
Save pranaygp/5856735 to your computer and use it in GitHub Desktop.
Simple function that changes css property on mouse enter, and reverts back to the original on mouse leave... REQUIRES jQuery
Usage: $('selector').CSShover('property','value')
Example: $('#link').CSShover('color','#ff0000')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(a){jQuery.fn.CSShover=function(d,c){var b;this.hover(function(){b=a(this).css(d);a(this).css(d,c);},function(){a(this).css(d,b);});};})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment