PageSourceSearch

https://www.cognashene.com/preloader/js/jquery.preloader.js

js cognashene.com collected 2026-10-02 00:15:56 UTC 1,828 bytes, 85 lines download raw bytes

1// JavaScript Document
2$.fn.preloader = function(options){
3	
4	var defaults = {
5		 delay:200,
6		 preload_parent:"a",
7		 check_timer:300,
8		 ondone:function(){ },
9		 oneachload:function(image){ },
10		 fadein:500,
11		 not_preloader: 'img.h'
12	};
13	
14	// variables declaration and precaching images and parent container
15	 var options = $.extend(defaults, options),
16		 root = $(this) ,  timer ,  counter = 0, i=0 , checkFlag = [] , delaySum = options.delay;
17	if ($.browser.msie) {
18		 var images = root.find("img").not(options.not_preloader)  
19	} else {
20		 var images = root.find("img").not(options.not_preloader).css({"visibility":"hidden",opacity:0})
21	}
22	 
23	 var init = function() {
24		
25		timer = setInterval(function(){
26			
27			if(counter>=checkFlag.length)
28			{
29			clearInterval(timer);
30			options.ondone();
31			return;
32			}
33		
34			for(i=0;i<images.length;i++)
35			{
36				if(images[i].complete==true)
37				{
38					if(checkFlag[i]==false)
39					{
40						checkFlag[i] = true;
41						options.oneachload(images[i]);
42						counter++;
43						
44						delaySum = delaySum + options.delay;
45					}
46					$(images[i]).css("visibility","visible").delay(delaySum).animate({opacity:1},options.fadein,
47					function(){ $(this).parent().removeClass("preloader"); });
48				 
49				}
50			}
51		
52			},options.check_timer) 
53		 
54		 
55	};
56	
57	images.each(function(){
58		if($(this).parent(options.preload_parent).length==0)
59		$(this).wrap("<a class='preloader' />");
60		else
61		$(this).parent().addClass("preloader");
62		
63		checkFlag[i++] = false;
64	}); 
65	
66	images = $.makeArray(images); 	
67	
68	var icon = jQuery("<img />",{		
69		id : 'loadingicon',
70		src : 'preloader/images/preloader-gallery.gif'		
71	}).hide().appendTo("body");
72	
73	timer = setInterval(function(){
74		
75		if(icon[0].complete==true)
76		{
77			clearInterval(timer);
78			init();
79			 icon.remove();
80			return;
81		}
82		
83		},100);
84	
85	}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.