PageSourceSearch

https://www.albertus.edu/assets/scroll-slider/slider.js

js albertus.edu collected 2026-10-03 19:15:56 UTC 8,016 bytes, 230 lines download raw bytes

1jQuery( document ).ready( function($) {
2
3
4  //*********************************************************************************
5  //****** Home page Slide Show
6  //****** https://codepen.io/bcarvalho/peden/gWPvJB
7
8          var slideshowDuration = 4000;
9          var slideshow=$('.main-slideshow .slideshow');
10
11          function slideshowSwitch(slideshow,index,auto){
12            if(slideshow.data('wait')) return;
13
14            var slides = slideshow.find('.slide');
15            var pages = slideshow.find('.pagination');
16            var activeSlide = slides.filter('.is-active');
17            var activeSlideImage = activeSlide.find('.image-container');
18            var newSlide = slides.eq(index);
19            var newSlideImage = newSlide.find('.image-container');
20            var newSlideContent = newSlide.find('.slide-content');
21            var newSlideElements=newSlide.find('.caption > *');
22            if(newSlide.is(activeSlide))return;
23
24            newSlide.addClass('is-new');
25            var timeout=slideshow.data('timeout');
26            clearTimeout(timeout);
27            slideshow.data('wait',true);
28            var transition=slideshow.attr('data-transition');
29            if(transition=='fade'){
30              newSlide.css({
31                display:'block',
32                zIndex:2
33              });
34              newSlideImage.css({
35                opacity:0
36              });
37
38              TweenMax.to(newSlideImage,1,{
39                alpha:1,
40                onComplete:function(){
41                  newSlide.addClass('is-active').removeClass('is-new');
42                  activeSlide.removeClass('is-active');
43                  newSlide.css({display:'',zIndex:''});
44                  newSlideImage.css({opacity:''});
45                  slideshow.find('.pagination').trigger('check');
46                  slideshow.data('wait',false);
47                  if(auto){
48                    timeout=setTimeout(function(){
49                      slideshowNext(slideshow,false,true);
50                    },slideshowDuration);
51                    slideshow.data('timeout',timeout);}}});
52            } else {
53              if(newSlide.index()>activeSlide.index()){
54                var newSlideRight=0;
55                var newSlideLeft='auto';
56                var newSlideImageRight=-slideshow.width()/8;
57                var newSlideImageLeft='auto';
58                var newSlideImageToRight=0;
59                var newSlideImageToLeft='auto';
60                var newSlideContentLeft='auto';
61                var newSlideContentRight=0;
62                var activeSlideImageLeft=-slideshow.width()/4;
63              } else {
64                var newSlideRight='';
65                var newSlideLeft=0;
66                var newSlideImageRight='auto';
67                var newSlideImageLeft=-slideshow.width()/8;
68                var newSlideImageToRight='';
69                var newSlideImageToLeft=0;
70                var newSlideContentLeft=0;
71                var newSlideContentRight='auto';
72                var activeSlideImageLeft=slideshow.width()/4;
73              }
74
75              newSlide.css({
76                display:'block',
77                width:0,
78                right:newSlideRight,
79                left:newSlideLeft
80                ,zIndex:2
81              });
82
83              newSlideImage.css({
84                width:slideshow.width(),
85                right:newSlideImageRight,
86                left:newSlideImageLeft
87              });
88
89              newSlideContent.css({
90                width:slideshow.width(),
91                left:newSlideContentLeft,
92                right:newSlideContentRight
93              });
94
95              activeSlideImage.css({
96                left:0
97              });
98
99              TweenMax.set(newSlideElements,{y:20,force3D:true});
100              TweenMax.to(activeSlideImage,1,{
101                left:activeSlideImageLeft,
102                ease:Power3.easeInOut
103              });
104
105              TweenMax.to(newSlide,1,{
106                width:slideshow.width(),
107                ease:Power3.easeInOut
108              });
109
110              TweenMax.to(newSlideImage,1,{
111                right:newSlideImageToRight,
112                left:newSlideImageToLeft,
113                ease:Power3.easeInOut
114              });
115
116              TweenMax.staggerFromTo(newSlideElements,0.8,{alpha:0,y:60},{alpha:1,y:0,ease:Power3.easeOut,force3D:true,delay:0.6},0.1,function(){
117                newSlide.addClass('is-active').removeClass('is-new');
118                activeSlide.removeClass('is-active');
119                newSlide.css({
120                  display:'',
121                  width:'',
122                  left:'',
123                  zIndex:''
124                });
125
126                newSlideImage.css({
127                  width:'',
128                  right:'',
129                  left:''
130                });
131
132                newSlideContent.css({
133                  width:'',
134                  left:''
135                });
136
137                newSlideElements.css({
138                  opacity:'',
139                  transform:''
140                });
141
142                activeSlideImage.css({
143                  left:''
144                });
145
146                slideshow.find('.pagination').trigger('check');
147                slideshow.data('wait',false);
148                if(auto){
149                  timeout=setTimeout(function(){
150                    slideshowNext(slideshow,false,true);
151                  },slideshowDuration);
152                  slideshow.data('timeout',timeout);
153                }
154              });
155            }
156          }
157
158          function slideshowNext(slideshow,previous,auto){
159            var slides=slideshow.find('.slide');
160            var activeSlide=slides.filter('.is-active');
161            var newSlide=null;
162            if(previous){
163              newSlide=activeSlide.prev('.slide');
164              if(newSlide.length === 0) {
165                newSlide=slides.last();
166              }
167            } else {
168              newSlide=activeSlide.next('.slide');
169              if(newSlide.length==0)
170                newSlide=slides.filter('.slide').first();
171            }
172
173            slideshowSwitch(slideshow,newSlide.index(),auto);
174          }
175
176          function homeSlideshowParallax(){
177            var scrollTop=$(window).scrollTop();
178            if(scrollTop>windowHeight) return;
179            var inner=slideshow.find('.slideshow-inner');
180            var newHeight=windowHeight-(scrollTop/2);
181            var newTop=scrollTop*0.8;
182
183            inner.css({
184              transform:'translateY('+newTop+'px)',height:newHeight
185            });
186          }
187
188          $(document).ready(function() {
189           $('.slide').addClass('is-loaded');
190
191           $('.slideshow .arrows .arrow').on('click',function(){
192            slideshowNext($(this).closest('.slideshow'),$(this).hasClass('prev'));
193          });
194
195           $('.slideshow .pagination .item').on('click',function(){
196            slideshowSwitch($(this).closest('.slideshow'),$(this).index());
197          });
198
199           $('.slideshow .pagination').on('check',function(){
200            var slideshow=$(this).closest('.slideshow');
201            var pages=$(this).find('.item');
202            var index=slideshow.find('.slides .is-active').index();
203            pages.removeClass('is-active');
204            pages.eq(index).addClass('is-active');
205          });
206
207          /* Lazyloading
208          $('.slideshow').each(function(){
209            var slideshow=$(this);
210            var images=slideshow.find('.image').not('.is-loaded');
211            images.on('loaded',function(){
212              var image=$(this);
213              var slide=image.closest('.slide');
214              slide.addClass('is-loaded');
215            });
216          */
217
218          var timeout=setTimeout(function(){
219            slideshowNext(slideshow,false,true);
220          },slideshowDuration);
221
222          slideshow.data('timeout',timeout);
223          });
224
225          if($('.main-slideshow .slideshow').length > 1) {
226            $(window).on('scroll',homeSlideshowParallax);
227          }
228
229
230});

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.