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