Codesnipp.it Social Code Sharing

Sergei Tatarinov

Changing img source on hover 2

by Sergei Tatarinov on Dec 03, 2011

$(function() { $("#menu img").hover(function() { $(this).attr("src", $(this).attr("src").split(".").join("-hover.")); }, function() { $(this).attr("src", $(this).attr("src").split("-hover.").join(".")); }); });

Can't see the comments? Please login first :)