PageSourceSearch

https://www.alliedschools.com/wp-content/themes/wp-common-theme/scripts/rex/wds-media-carousel.js?ver=1.3.2

js alliedschools.com collected 2026-09-29 07:56:14 UTC 2,725 bytes, 119 lines download raw bytes

1/**
2 * Powers the (Full Width) Media Carousel
3 */
4
5window.WDS_Media_Carousel = window.WDS_Media_Carousel || {};
6
7( function( window, document, $, app, undefined ) {
8
9	app.init = function() {
10		$('.grid-area').slick({
11			arrows: true,
12			infinite: true,
13			speed: 300,
14			slidesToShow: 4,
15			variableWidth: true
16		});
17
18	};
19
20	$( app.init );
21
22})( window, document, jQuery, window.WDS_Media_Carousel );
23
24/*
25* carousel video modal
26 */
27window.WDS_Modal = window.WDS_Model || {};
28
29( function( window, document, $, app, undefined ) {
30
31	app.init = function() {
32
33		var modal = (function(){
34		    var
35		    method = {},
36		    $overlay,
37		    $modal,
38		    $content,
39		    $close;
40
41			$overlay = $('<div class="media-modal-overlay"></div>');
42			$modal   = $('<div class="media-modal"></div>');
43			$content = $('<div class="media-modal-content"></div>');
44			$close   = $('<button class="media-modal-close" href="#"><span class="screen-reader-text">close</span></button>');
45			$open    = $('.open-modal');
46
47			$modal.hide();
48			$overlay.hide();
49			$modal.append($content, $close);
50
51			$(document).ready(function(){
52				// Add the overlay
53			    $('body').append($overlay, $modal);
54
55			    // Close the video container when we click the overlay
56			    $( 'body' ).on( 'click', '.media-modal-overlay', method.closeOnOverlayClick );
57			});
58
59		    // Center the modal in the viewport
60		    method.center = function () {
61				var top, left;
62
63			    top = Math.max($(window).height() - $modal.outerHeight(), 0) / 2;
64			    left = Math.max($(window).width() - $modal.outerWidth(), 0) / 2;
65
66			    $modal.css({
67			        top:top + $(window).scrollTop(),
68			        left:left + $(window).scrollLeft()
69			    });
70			};
71
72		    // Open the modal
73		    method.open = function (settings) {
74				$content.empty().append(settings.content);
75
76			    $modal.css({
77			        width: settings.width || 'auto',
78			        height: 'auto'
79			    })
80
81			    method.center();
82
83			    $(window).on('resize.modal', method.center);
84
85			    $modal.show();
86			    $overlay.show();
87			};
88
89		    // Close the modal
90		    method.close = function () {
91				$modal.hide();
92			    $overlay.hide();
93			    $content.empty();
94			    $(window).off('resize.modal');
95			};
96
97			$close.on('click', function(e){
98    			e.preventDefault();
99    			method.close();
100			});
101
102			// Close when we click outside of the video on the overlay
103			method.closeOnOverlayClick = function( event ) {
104				method.close();
105			}
106
107			$open.on('click', function(e){
108				e.preventDefault();
109				var embed = $(this).data('oembed');
110				modal.open({content: $(embed), width: "800px", height: "520px"});
111			});
112
113		    return method;
114		}());
115	};
116
117	$( app.init );
118
119})( window, document, jQuery, window.WDS_Modal );

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.