User:KazutoIKEDA/wiki/change-image.js

From 2009.igem.org

(Difference between revisions)
Line 10: Line 10:
     )
     )
.click( function() {
.click( function() {
-
        var changeSrc = $("#mandala .thumbnail img").attr("name");
 
         $("#mandala .object img").attr("src", "https://static.igem.org/mediawiki/2009/a/af/Mandala2.jpg");
         $("#mandala .object img").attr("src", "https://static.igem.org/mediawiki/2009/a/af/Mandala2.jpg");
-
        return false;
 
     });
     });
});
});

Revision as of 19:32, 21 October 2009

$(document).ready( function() {
    $("#mandala .thumbnail img")
    .hover( 
        function(){// マウスオーバー時
            $(this).fadeTo(200, 0.7);
        },
        function(){// マウスアウト時
            $(this).fadeTo(500, 1.0);
        }
    )
	.click( function() {
        $("#mandala .object img").attr("src", "https://static.igem.org/mediawiki/2009/a/af/Mandala2.jpg");
    });

});