jQuery – Easy image rollover

$(".hover").hover( function() {
		var currentImage = $(this).attr("src");
		$(this).attr("src", $(this).attr("hover"));
		$(this).attr("hover", currentImage);
		//css("background-position", "-50px 0");
	}, function() {
		var currentImage = $(this).attr("src");
		$(this).attr("src", $(this).attr("hover"));
		$(this).attr("hover", currentImage);
	});

Leave a Reply