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