PageSourceSearch

https://www.winthrop.edu/_resources/js/gallery.js

js winthrop.edu collected 2026-10-01 09:24:44 UTC 2,657 bytes, 113 lines download raw bytes

1var slideIndex = 1;
2/** Progress Gallery **/
3$(document).ready(function(){
4	
5	
6	
7	// if the Related Links box is in the page AND the URL matches a given regex pattern
8
9	
10    var percent = 0, bar = $('.transition-timer-carousel-progress-bar'), crsl = $('.progress-carousel');
11          function progressBarCarousel() {
12            bar.css({width:percent+'%'});
13           percent = percent +0.5;
14            if (percent>100) {
15                percent=0;
16                crsl.carousel('next');
17            }      
18          }
19	
20	// Get the current page URL:
21	var url = window.location.href;
22	
23	// if we're on the home page, then the slideshow interval will be set to 30 seconds - else, if we're not on the home page, then the slideshow interval will be set at 10 seconds...
24   if (url.match(/https\:\/\/www\.winthrop((\.edu)|(\.edu\/)|(\.edu\/index\.aspx))$/i)) {
25	   
26	//console.log(url);
27	$('.carousel').carousel({
28	 interval: 30000
29		})
30	}
31	
32	else {
33		
34		if (window.matchMedia('(max-width: 820px)').matches) {
35		
36	 $('.carousel').carousel({
37	 interval: 0
38			})		
39		}
40		else {
41			$('.carousel').carousel({
42	 interval: 10000
43			})	
44		}
45		
46	}
47							
48
49	
50
51		
52          crsl.carousel({  
53              interval: false,
54              pause: true
55          }).on('slid.bs.carousel', function () {});var barInterval = setInterval(progressBarCarousel, 100);
56	
57	
58	
59	
60          crsl.hover(
61              function(){
62                  clearInterval(barInterval);
63              },
64              function(){
65                  barInterval = setInterval(progressBarCarousel, 100);
66        })
67		  showSlides(slideIndex);
68	});
69
70
71
72
73
74
75        function plusSlides(n) {
76        showSlides(slideIndex += n);
77        }
78
79        function currentSlide(n) {
80        showSlides(slideIndex = n);
81        }
82
83        function showSlides(n) {
84		if(slideIndex == undefined)
85		{
86			slideIndex = 1;
87		}
88        var i;
89			
90        var slides = document.getElementsByClassName("mySlides");
91        var dots = document.getElementsByClassName("img-item");
92		if(slides.length > 0)
93			{
94				 //   var captionText = document.getElementById("caption");
95        if (n > slides.length) {slideIndex = 1}
96        if (n < 1) {slideIndex = slides.length}
97        for (i = 0; i < slides.length; i++) {
98            slides[i].style.display = "none";
99        }
100        for (i = 0; i < dots.length; i++) {
101            dots[i].className = dots[i].className.replace(" active", "");
102        }
103		slides[slideIndex-1].style.display = "block";
104        dots[slideIndex-1].className += " active";
105        //   captionText.innerHTML = dots[slideIndex-1].alt;
106}
107       
108        }
109
110
111/** Photo Gallery**/
112        
113        

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.