User:KazutoIKEDA/wiki/change-image.js
From 2009.igem.org
(Difference between revisions)
KazutoIKEDA (Talk | contribs) |
KazutoIKEDA (Talk | contribs) |
||
Line 1: | Line 1: | ||
$(document).ready( function() { | $(document).ready( function() { | ||
$("#sample .thumbnail img").click( function() { | $("#sample .thumbnail img").click( function() { | ||
- | var changeSrc = this.src; | + | var changeSrc = $(this).src; |
$("#sample .target img").fadeOut( | $("#sample .target img").fadeOut( | ||
"slow", | "slow", |
Revision as of 19:04, 19 October 2009
$(document).ready( function() { $("#sample .thumbnail img").click( function() { var changeSrc = $(this).src; $("#sample .target img").fadeOut( "slow", function() { $(this).attr("src", changeSrc); $(this).fadeIn("slow"); } ); }); }); $(document).ready( function() { $(".funwari") .hover( function(){// マウスオーバー時 $(this).fadeTo(200, 0.8); }, function(){// マウスアウト時 $(this).fadeTo(600, 1.0); } ); });