1(function($) { 2 $(function() { 3 imagesLoaded('#campus-slider', function() { 4 5 var centerControls = function(container) { 6 var controls = container.find('.controls'), 7 ih = container.find('li.active img').outerHeight(), 8 ch = controls.outerHeight(); 9 10 } 11 12 var sliderContain = $('#campus-slider-container'), 13 initCalled = false, 14 slider = $("#campus-slider").sudoSlider({ 15 continuous:true, 16 responsive:true, 17 speed:600, 18 slideCount:1, 19 autoHeight:false, 20 controlsAttr:'class="controls"', 21 initCallback: function() { 22 sliderContain.find('li.first').addClass('active').find('.caption').slideDown('fast'); 23 24 // we only want this stuff to run once 25 if (!initCalled) { 26 27 $(window).on('resize.sliderControls', $.throttle(100,function(){ 28 centerControls(sliderContain); 29 })); 30 31 initCalled = true; 32 } 33 }, 34 afterAnimation: function(t) { 35 var that = this; 36 37 sliderContain.find('li').not(this).removeClass('active').find('.caption').hide(function() { 38 $(that).addClass('active').find('.caption').slideDown('fast'); 39 }); 40 } 41 }); 42 43 if ($('body').hasClass('touch')) { 44 $(sliderContain).on('swiperight.slider',function() { slider.goToSlide("prev") }); 45 $(sliderContain).on('swipeleft.slider',function() { slider.goToSlide("next") }); 46 } 47 48 $(window).on('resize.sliderPause',function(){ slider.stopAnimation() }); 49 }); 50 }); 51})($JQ);
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.