Team:Alberta/application.js
From 2011.igem.org
(Difference between revisions)
m |
m |
||
Line 11: | Line 11: | ||
}); | }); | ||
+ | |||
+ | |||
+ | |||
+ | if (document.images) | ||
+ | { | ||
+ | preload_image_object = new Image(); | ||
+ | // set image url | ||
+ | image_url = new Array(); | ||
+ | image_url[0] = "https://static.igem.org/mediawiki/2011/1/10/TeamAlbertaButton1.JPG"; | ||
+ | image_url[1] = "https://static.igem.org/mediawiki/2011/5/50/TeamAlbertaButton1-Hover-v1.JPG"; | ||
+ | image_url[2] = "https://static.igem.org/mediawiki/2011/9/9d/TeamAlberta-Button2.JPG"; | ||
+ | image_url[3] = "https://static.igem.org/mediawiki/2011/3/3d/TeamAlberta-Button2-Hover-v1.JPG"; | ||
+ | image_url[4] = "https://static.igem.org/mediawiki/2011/8/81/Notebook.JPG"; | ||
+ | image_url[5] = "https://static.igem.org/mediawiki/2011/b/bf/TeamAlberta-Button3-Hover-v1.JPG"; | ||
+ | |||
+ | var i = 0; | ||
+ | for(i=0; i<=5; i++) | ||
+ | preload_image_object.src = image_url[i]; | ||
+ | } |
Revision as of 03:41, 12 July 2011
// This file for javascript that we want to include on all pages
$(document).ready(function(){
// show the drop down list on hover $('li.headlink').hover( /*function() { $('ul', this).show(); }, function() { $('ul', this).hide(); }*/ function() { $('ul', this).css('display', 'table') }, function() { $('ul', this).css('display', 'none') } );
});
if (document.images) { preload_image_object = new Image(); // set image url image_url = new Array(); image_url[0] = ""; image_url[1] = ""; image_url[2] = ""; image_url[3] = ""; image_url[4] = ""; image_url[5] = "";
var i = 0; for(i=0; i<=5; i++) preload_image_object.src = image_url[i]; }