PageSourceSearch

https://www.goodhopefm.co.za/goodhopefm/wp-content/plugins/qt-videogalleries/assets/vdl-main.js?ver=1.0.0

js goodhopefm.co.za collected 2026-10-02 19:25:15 UTC 3,851 bytes, 119 lines download raw bytes

1/* = quicksand filter
2======================================================*/
3jQuery.noConflict();
4/**====================================================================
5 *
6 *
7 * 	02. Check images loaded in a container
8 *
9 * 
10 ====================================================================*/
11jQuery.fn.imagesLoaded = function () {
12	// get all the images (excluding those with no src attribute)
13	var $imgs = this.find('img[src!=""]');
14	// if there's no images, just return an already resolved promise
15	if (!$imgs.length) {return jQuery.Deferred().resolve().promise();}
16	// for each image, add a deferred object to the array which resolves when the image is loaded (or if loading fails)
17	var dfds = [];  
18	$imgs.each(function(){
19		var dfd = jQuery.Deferred();
20		dfds.push(dfd);
21		var img = new Image();
22		img.onload = function(){dfd.resolve();};
23		img.onerror = function(){dfd.resolve();};
24		img.src = this.src;
25	});
26	// return a master promise object which will resolve when all the deferred objects have resolved
27	// IE - when all the images are loaded
28	return jQuery.when.apply(jQuery,dfds);
29};
30jQuery.fn.removeMyStyle = function(style){
31	if(typeof(style) !== "undefined" && style !== undefined){
32	    var search = new RegExp(style + '[^;]+;?', 'g');
33	    return this.each(function()    {
34	        jQuery(this).attr('style', function(i, styles){
35	        	if(styles !== undefined){
36	            return styles.replace(search, '');	        		
37	        	}
38
39	        });
40	    });
41	}
42};
43// auto background activation =======================================//	
44jQuery.vdl_autoBgStyles = function(){
45	jQuery("[data-bgimg]").each(function(){
46		var img = jQuery(this).attr("data-bgimg");
47		if(img !== ""){
48			jQuery(this).css({"background": "url("+img+")","background-size":"cover" });
49		}
50	});	
51};
52jQuery.vdl_autoBgStyles();
53
54// Quicksand activation =======================================//
55jQuery.activateFilterBlocks = function(){
56  	var jQueryfilterType = jQuery('.filterOptions li.active a').attr('class');
57  	var jQueryholder = jQuery('.filterable-grid');
58  	var jQuerydata = jQueryholder.clone();
59  	var filteredData;
60	jQuery('.filterOptions a').click(function(e) {
61		e.preventDefault();
62		jQuery('.filterOptions li').removeClass('active');
63		jQueryfilterType = jQuery(this).attr('class');
64		jQuery(this).parent().addClass('active');
65		if (jQueryfilterType === 'all') {
66			filteredData = jQuerydata.find('.fgchild');
67		} else {
68			filteredData = jQuerydata.find('.fgchild[data-type~=' + jQueryfilterType + ']');
69		}
70		// call quicksand and assign transition parameters
71		jQueryholder.quicksand(filteredData, {
72			duration: 200,
73			adjustHeight: 'dynamic' ,
74			easing: 'easeInOutQuad'
75		});
76		return false;
77	});
78	jQuery("#vdlsubpagesAll").click();
79};
80jQuery.vdl_todoAfterResize = function(){
81	if(jQuery.beingExecuted === 0){
82		jQuery.beingExecuted = 1;
83		jQuery(".filterable-grid").css({opacity:0});
84		jQuery(".filterable-grid").each(function(){
85			var that = jQuery(this);		
86			var width = that.find(".vdl-subpages-item:first-child").outerWidth(),
87				height = width/16*9;
88			that.find('.vdl-element').each(function(){
89				jQuery(this).css({height:height+"px",width:width+"px"});
90			});
91			that.animate({opacity:1},30);
92		});
93		jQuery.activateFilterBlocks();
94		jQuery(".filterable-grid").animate({opacity:1},50);
95	}
96	jQuery.beingExecuted = 0;
97};
98jQuery.vdl_FixBlocks = function() {
99	jQuery.vdl_todoAfterResize();
100};
101jQuery.vdl_OnResize = function() {
102	jQuery('.vdl-element, .filterable-grid').removeMyStyle("width");
103	jQuery.vdl_FixBlocks(1);
104};
105jQuery.vdl_Init = function(){
106	jQuery.beingExecuted = 0;
107	jQuery.vdl_autoBgStyles();
108	jQuery.vdl_FixBlocks(1);	
109};
110jQuery(window).load(function() {
111	jQuery("body").imagesLoaded().then(function(){
112		jQuery.vdl_Init();
113	});
114});
115
116jQuery(window).on('resize', function() {
117	jQuery.vdl_OnResize();
118});
119

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.