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() { | ||
- | $(".thumbnail img").click( function() { | + | $(".thumbnail img") |
- | + | .click( | |
- | + | function() { | |
- | + | var changeSrc = this.src; | |
+ | $(".target img").attr("src", changeSrc); | ||
+ | } | ||
+ | ); | ||
}); | }); | ||
Revision as of 03:19, 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); } ); });