User:KazutoIKEDA/wiki/change-image.js

From 2009.igem.org

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh); Konqueror: click Reload or press F5; Opera: clear the cache in Tools → Preferences; Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

$(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);
    }
  );
});