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