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() {
 	$("#biomario .thumbnail img")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},
                        function(){
				$(this).fadeTo(600, 1.0);
			}

			);

 	$("#cocktail .thumbnail a")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},function(){
				$(this).fadeTo(600, 1.0);
			}
		)
			.click(
				function() {
					$("#cocktail .target img").attr("src", $(this).attr("href"));
					return false;
				}
			);
 	$("#mandala .thumbnail a")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},function(){
				$(this).fadeTo(600, 1.0);
			}
		)
			.click(
				function() {
					$("#mandala .target img").attr("src", $(this).attr("href"));
					return false;
				}
			);
 	$("#pyramid .thumbnail a")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},function(){
				$(this).fadeTo(600, 1.0);
			}
		)
			.click(
				function() {
					$("#pyramid .target img").attr("src", $(this).attr("href"));
					return false;
				}
			);
 	$("#tomb .thumbnail a")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},function(){
				$(this).fadeTo(600, 1.0);
			}
		)
			.click(
				function() {
					$("#tomb .target img").attr("src", $(this).attr("href"));
					return false;
				}
			);
 	$("#bunny .thumbnail a")
		.hover( 
			function(){
				$(this).fadeTo(200, 0.8);
			},function(){
				$(this).fadeTo(600, 1.0);
			}
		)
			.click(
				function() {
					$("#bunny .target img").attr("src", $(this).attr("href"));
					return false;
				}
			);
}):