source: extensions/stripped/js/preload.js @ 27649

Last change on this file since 27649 was 12547, checked in by Zaphod, 13 years ago

version 2.0.0

File size: 570 bytes
Line 
1jQuery(window).load(function() {
2    setTimeout(function() {
3     // Prefetch all files referenced in prefetch tags
4     var $prefetchTags = jQuery('HEAD LINK[rel=prefetch][href]');
5
6     // preload all prefetched image links
7     $prefetchTags.filter('[href$=.jpg],[href$=.jpeg]')
8     .each(function() {
9             new Image().src = this.href;
10     });
11         
12     // preload all images with class=preload
13         var $preload = jQuery(".preload");
14     $preload.each(function() {
15            new Image().src = jQuery(this).html();
16     });
17
18    }, 0);
19});
Note: See TracBrowser for help on using the repository browser.