Return to Snippet

Revision: 26867
at May 13, 2010 11:03 by cs2css3


Initial Code
$(function(){
	$(".over img").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_o(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"))
	})
})

Initial URL

                                

Initial Description

                                

Initial Title
cs2css3's jroll

Initial Tags
javascript, jquery

Initial Language
jQuery