PageSourceSearch

https://cityofmelfort.ca/js/carousel_aHR0cD.js

js cityofmelfort.ca collected 2026-09-25 00:36:29 UTC 2,416 bytes, 77 lines download raw bytes

1$(function(){
2	'use strict';
3	
4	// CAROUSEL SECTION
5	// MAKES THE IMAGES AS BACKGROUND-IMAGE INSIDE THE CAROUSEL (DEFAULT.ASPX)
6	var $wWidth = $(window).width(),
7        $wheight = $(window).height(),
8        $imageCarousel = $('#carousel .item img'),
9	    $slideQty = $('#carousel .item').length; // COUNTS THE CAROUSEL INDICATORS
10
11    // Checks For The Size of The Viewport
12    //if ( $wWidth > 768 ) {
13        $('.fullHeight').css('height', $wheight);
14        
15	    // REPLACE IMAGES INSIDE CAROUSELS WITH A BACKGROUND IMAGE.
16	    $('#carousel .item img').each(function(){
17            var $imgSrc = $(this).attr('src');
18		
19		    $(this).parent().css({'background-image': 'url('+$imgSrc+')' });
20    	    //$(this).remove();
21            $(this).hide();
22	    });  
23    //} else {
24    //    $('.fullHeight').css('height', $wheight);
25    //}
26	
27	// ADJUST THE HEIGHT OF .FULLHEIGHT WHEN RESIZED.
28	$(window).resize(function(){
29		var $imageCarousel = $('#carousel .item img'),
30            $wWidth = $(window).width(),
31            $wheight = $(window).height();
32		
33		//$('.fullHeight').css('height', $wheight);
34
35        // Checks For The Size of The Viewport
36        //if ( $wWidth > 768 ) {
37            $('.fullHeight').css('height', $wheight);
38        
39	        // REPLACE IMAGES INSIDE CAROUSELS WITH A BACKGROUND IMAGE.
40	        $('#carousel .item img').each(function(){
41                var $imgSrc = $(this).attr('src');
42		
43		        $(this).parent().css({'background-image': 'url('+$imgSrc+')' });
44    	        //$(this).remove();
45                $(this).hide();
46	        });  
47        //} else {
48        //    $('.fullHeight').css('height', 'auto');
49        //    $imageCarousel.show();
50        //}
51	});
52	
53	// AUTOMATICALLY GENERATE CAROUSEL INDICATORS
54	for( var i=0; i < $slideQty; i++ ){
55		var insertText = '<li data-target="#carousel" data-slide-to="' +i+ '"></li>';
56		
57		$('#carousel ol').append(insertText);
58		$('#carousel ol li:first-child').addClass('active');
59	}
60	
61	$('#carousel').carousel({
62		pause: false,
63		interval: 7000
64	});
65
66    // ATTACH A SWIPE EVENT
67	$(".carousel-inner").swipe({
68	    swipeLeft: function (event, direction, distance, duration, fingerCount) {
69	        $(this).parent().carousel('prev');
70	    },
71	    swipeRight: function () {
72	        $(this).parent().carousel('next');
73	    },
74	    threshold: 0
75	});
76	
77});

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.