Created
May 5, 2015 20:42
-
-
Save greymechanic/4cfc6f435ce0e9dfe918 to your computer and use it in GitHub Desktop.
Icon hover Jquery replace
This file contains 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
$('img.social').hover (-> | |
pathA = '/wp-content/themes/pollyport/assets/images/social-' | |
theId = $(this).attr 'id' | |
pathB = '-2x-green.png' | |
path = siteUrl + pathA + theId + pathB | |
$(this).attr 'src', path | |
), -> | |
pathA = '/wp-content/themes/pollyport/assets/images/social-' | |
theId = $(this).attr 'id' | |
pathB = '-2x.png' | |
path = siteUrl + pathA + theId + pathB | |
$(this).attr 'src', path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment