20
Jul
Post on 10:10, July 20, 2009, by Sue Zhou

Instead of using onmouseover, onmouseout in each image, use the following function.

Remember to name the images in specific format.

$("img.rollover").hover(
	function() { $(this).attr("src", $(this).attr("src").split("_s.").join("_o.")); },
	function() { $(this).attr("src", $(this).attr("src").split("_o.").join("_s.")); }
);
Category: 分享  Tags: ,
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>