Team:Alberta/application.js
From 2011.igem.org
(Difference between revisions)
m |
m |
||
Line 13: | Line 13: | ||
- | + | function preload(images) { | |
- | if (document.images) | + | if (document.images) { |
- | + | var i = 0; | |
- | + | var imageArray = new Array(); | |
- | + | imageArray = images.split(','); | |
- | + | var imageObj = new Image(); | |
- | + | for(i=0; i<=imageArray.length-1; i++) { | |
- | + | //document.write('<img src="' + imageArray[i] + '" />');// Write to page (uncomment to check images) | |
- | + | imageObj.src=images[i]; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | } |
Revision as of 03:57, 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') } );
});
function preload(images) {
if (document.images) { var i = 0; var imageArray = new Array(); imageArray = images.split(','); var imageObj = new Image(); for(i=0; i<=imageArray.length-1; i++) { //document.write('<img src="' + imageArray[i] + '" />');// Write to page (uncomment to check images) imageObj.src=images[i]; } }
}