Lines Matching full:if
88 if(this.length == 0) return this;
91 if(this.length > 1){
127 // check if actual number of slides is less than minSlides / maxSlides
128 …if(slider.children.length < slider.settings.minSlides) slider.settings.minSlides = slider.children…
129 …if(slider.children.length < slider.settings.maxSlides) slider.settings.maxSlides = slider.children…
130 // if random start, set the startSlide setting to random number
131 …if(slider.settings.randomStart) slider.settings.startSlide = Math.floor(Math.random() * slider.chi…
134 // store if the slider is in carousel mode (displaying / moving multiple slides)
136 // if carousel, force preloadImages = 'all'
137 if(slider.carousel) slider.settings.preloadImages = 'all';
142 // store the current state of the slider (if currently animating, working is true)
150 // determine if hardware acceleration can be used
158 if(div.style[props[i]] !== undefined){
166 // if vertical mode always make maxSlides and minSlides equal
167 if(slider.settings.mode == 'vertical') slider.settings.maxSlides = slider.settings.minSlides;
194 // if using CSS, add the easing property
195 if(slider.usingCSS && slider.settings.easing){
197 // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
198 }else if(!slider.settings.easing){
212 if(!slider.settings.pager) {
225 // if slideMargin is supplied, add the css
226 …if(slider.settings.mode == 'horizontal' && slider.settings.slideMargin > 0) slider.children.css('m…
227 …if(slider.settings.mode == 'vertical' && slider.settings.slideMargin > 0) slider.children.css('mar…
228 // if "fade" mode, add positioning and z-index CSS
229 if(slider.settings.mode == 'fade'){
240 // if captions are requested, add them
241 if(slider.settings.captions) appendCaptions();
242 // check if startSlide is last slide
244 // if video is true, set up the fitVids plugin
245 if(slider.settings.video) el.fitVids();
248 if (slider.settings.preloadImages == "all") preloadSelector = slider.children;
249 // only check for control addition if not in "ticker" mode
250 if(!slider.settings.ticker){
251 // if pager is requested, add it
252 if(slider.settings.pager) appendPager();
253 // if controls are requested, add them
254 if(slider.settings.controls) appendControls();
255 // if auto is true, and auto controls are requested, add them
256 if(slider.settings.auto && slider.settings.autoControls) appendControlsAuto();
257 // if any control option is requested, add the controls wrapper
258 …if(slider.settings.controls || slider.settings.autoControls || slider.settings.pager) slider.viewp…
259 // if ticker mode, do not allow a pager
269 if (total == 0){
275 if(++count == total) callback();
279 if(el.is('img')){
285 if (loaded) return;
292 // Check if image has width, that means it is loaded already.
293 // This is because some browsers will not trigger load event if it's from cache.
295 if (img.width && !loaded){
312 // if infinite loop, prepare additional slides
313 if(slider.settings.infiniteLoop && slider.settings.mode != 'fade' && !slider.settings.ticker){
323 // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
324 if (slider.settings.mode == 'vertical') slider.settings.adaptiveHeight = true;
334 if (slider.settings.responsive) $(window).bind('resize', resizeWindow);
335 // if auto is true, start the show
336 if (slider.settings.auto && slider.settings.autoStart && slider.children.length > 1) initAuto();
337 // if ticker is true, start the ticker
338 if (slider.settings.ticker) initTicker();
339 // if pager is requested, make the appropriate pager link active
340 if (slider.settings.pager) updatePagerActive(slider.settings.startSlide);
342 if (slider.settings.controls) updateDirectionControls();
343 // if touchEnabled is true, setup the touch events
344 if (slider.settings.touchEnabled && !slider.settings.ticker) initTouch();
354 // if mode is not "vertical" and adaptiveHeight is false, include all children
355 if(slider.settings.mode != 'vertical' && !slider.settings.adaptiveHeight){
358 // if not carousel, return the single active child
359 if(!slider.carousel){
361 // if carousel, return a slice of children
369 // if looped back to the start
370 if(currentIndex + i >= slider.children.length){
378 // if "vertical" mode, calculate the sum of the heights of the children
379 if(slider.settings.mode == 'vertical'){
384 if(slider.settings.slideMargin > 0){
387 // if not "vertical" mode, calculate the max height of the children
401 if(slider.settings.slideWidth > 0){
402 if(slider.settings.mode == 'horizontal'){
419 // if slide width was not supplied, or is larger than the viewport use the viewport width
420 if(slider.settings.slideWidth == 0 ||
424 // if carousel, use the thresholds to determine the width
425 }else if(slider.settings.maxSlides > 1 && slider.settings.mode == 'horizontal'){
426 if(wrapWidth > slider.maxThreshold){
428 }else if(wrapWidth < slider.minThreshold){
440 if(slider.settings.mode == 'horizontal' && slider.settings.slideWidth > 0){
441 // if viewport is smaller than minThreshold, return minSlides
442 if(slider.viewport.width() < slider.minThreshold){
444 // if viewport is larger than minThreshold, return maxSlides
445 }else if(slider.viewport.width() > slider.maxThreshold){
447 // if viewport is between min / max thresholds, divide viewport width by first child width
452 // if "vertical" mode, slides showing will always be minSlides
453 }else if(slider.settings.mode == 'vertical'){
464 // if moveSlides is specified by the user
465 if(slider.settings.moveSlides > 0){
466 if(slider.settings.infiniteLoop){
479 // if moveSlides is 0 (auto) divide children length by sides showing, then round up
490 // if moveSlides was set by the user and moveSlides is less than number of slides showing
491 if(slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()){
494 // if moveSlides is 0 (auto)
502 // if last slide, not infinite loop, and number of children is larger than specified maxSlides
503 …if(slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.in…
504 if (slider.settings.mode == 'horizontal'){
510 }else if(slider.settings.mode == 'vertical'){
517 // if not last slide
522 if (slider.active.index == getPagerQty() - 1) slider.active.last = true;
524 if (position != undefined){
525 if (slider.settings.mode == 'horizontal') setPositionProperty(-position.left, 'reset', 0);
526 else if (slider.settings.mode == 'vertical') setPositionProperty(-position.top, 'reset', 0);
533 * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
549 if(slider.usingCSS){
554 if(type == 'slide'){
563 }else if(type == 'reset'){
565 }else if(type == 'ticker'){
583 if(type == 'slide'){
587 }else if(type == 'reset'){
589 }else if(type == 'ticker'){
605 if(pagerQty <= 1) return;
609 // if a buildPager function is supplied, use it to get pager link value, else use index + 1
610 if(slider.settings.buildPager && $.isFunction(slider.settings.buildPager)){
629 if(!slider.settings.pagerCustom){
632 // if a pager selector was supplied, populate it with the pager
633 if(slider.settings.pagerSelector){
635 // if no pager selector was supplied, add it after the wrapper
657 // if nextSlector was supplied, populate it
658 if(slider.settings.nextSelector){
661 // if prevSlector was supplied, populate it
662 if(slider.settings.prevSelector){
665 // if no custom selectors were supplied
666 if(!slider.settings.nextSelector && !slider.settings.prevSelector){
687 // if autoControlsCombine, insert only the "start" control
688 if(slider.settings.autoControlsCombine){
690 // if autoControlsCombine is false, insert both controls
694 // if auto controls selector was supplied, populate it with the controls
695 if(slider.settings.autoControlsSelector){
697 // if auto controls selector was not supplied, add it after the wrapper
714 if (title != undefined && ('' + title).length) {
727 // if auto show is running, stop it
728 if (slider.settings.auto) el.stopAuto();
740 // if auto show is running, stop it
741 if (slider.settings.auto) el.stopAuto();
775 // if auto show is running, stop it
776 if (slider.settings.auto) el.stopAuto();
779 // if clicked pager link is not active, continue with the goToSlide call
780 if(pagerIndex != slider.active.index) el.goToSlide(pagerIndex);
791 // if "short" pager type
793 if(slider.settings.pagerType == 'short'){
794 if(slider.settings.maxSlides > 1) {
810 // if infinte loop is true
811 if(slider.settings.infiniteLoop){
814 if(slider.active.index == 0){
818 }else if(slider.active.index == getPagerQty() - 1 && slider.carousel){
821 }else if(slider.active.index == slider.children.length - 1){
824 if (slider.settings.mode == 'horizontal') { setPositionProperty(-position.left, 'reset', 0);; }
825 … else if (slider.settings.mode == 'vertical') { setPositionProperty(-position.top, 'reset', 0);; }
840 // if autoControlsCombine is true, replace the current control with the new state
841 if(slider.settings.autoControlsCombine){
843 // if autoControlsCombine is false, apply the "active" class to the appropriate control
851 * Updates the direction controls (checks if either should be hidden)
854 if(getPagerQty() == 1){
857 }else if(!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd){
858 // if first slide
859 if (slider.active.index == 0){
862 // if last slide
863 }else if(slider.active.index == getPagerQty() - 1){
866 // if any slide in the middle
878 // if autoDelay was supplied, launch the auto show using a setTimeout() call
879 if(slider.settings.autoDelay > 0){
881 // if autoDelay was not supplied, start the auto show normally
885 // if autoHover is requested
886 if(slider.settings.autoHover){
889 // if the auto show is currently playing (has an active interval)
890 if(slider.interval){
897 // if the autoPaused value was created be the prior "mouseover" event
898 if(slider.autoPaused){
913 // if autoDirection is "next", append a clone of the entire slider
914 if(slider.settings.autoDirection == 'next'){
916 // if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
927 // if autoHover is requested
928 if(slider.settings.tickerHover && !slider.usingCSS){
958 // if "next" animate left position to last child, then reset left to 0
959 if(slider.settings.autoDirection == 'next'){
961 // if "prev" animate left position to 0, then reset left to first non-clone child
990 if(slider.working){
1014 // if scrolling on y axis, do not prevent default
1018 if((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX){
1021 }else if((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY){
1024 if(slider.settings.mode != 'fade' && slider.settings.oneToOneTouch){
1026 // if horizontal, drag along x axis
1027 if(slider.settings.mode == 'horizontal'){
1030 // if vertical, drag along y axis
1052 // if fade mode, check if absolute x distance clears the threshold
1053 if(slider.settings.mode == 'fade'){
1055 if(distance >= slider.settings.swipeThreshold){
1063 if(slider.settings.mode == 'horizontal'){
1070 // if not infinite loop and first / last slide, do not attempt a slide transition
1071 …if(!slider.settings.infiniteLoop && ((slider.active.index == 0 && distance > 0) || (slider.active.…
1074 // check if distance clears threshold
1075 if(Math.abs(distance) >= slider.settings.swipeThreshold){
1097 if(windowWidth != windowWidthNew || windowHeight != windowHeightNew){
1122 // if plugin is currently in motion, ignore request
1123 if(slider.working || slider.active.index == slideIndex) return;
1128 …// if slideIndex is less than zero, set active index to last child (this happens during infinite l…
1129 if(slideIndex < 0){
1131 …// if slideIndex is greater than children length, set active index to 0 (this happens during infin…
1132 }else if(slideIndex >= getPagerQty()){
1140 if(direction == 'next'){
1142 }else if(direction == 'prev'){
1145 // check if last slide
1148 if(slider.settings.pager) updatePagerActive(slider.active.index);
1150 if(slider.settings.controls) updateDirectionControls();
1151 // if slider is set to mode: "fade"
1152 if(slider.settings.mode == 'fade'){
1153 …// if adaptiveHeight is true and next height is different from current height, animate to the new …
1154 if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1166 …// if adaptiveHeight is true and next height is different from current height, animate to the new …
1167 if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1172 // if carousel and not infinite loop
1173 if(!slider.settings.infiniteLoop && slider.carousel && slider.active.last){
1174 if(slider.settings.mode == 'horizontal'){
1186 }else if(slider.carousel && slider.active.last && direction == 'prev'){
1191 // if infinite loop and "Next" is clicked on the last slide
1192 }else if(direction == 'next' && slider.active.index == 0){
1197 }else if(slideIndex >= 0){
1202 /* If the position doesn't exist
1203 * (e.g. if you destroy the slider on a next click),
1206 if ("undefined" !== typeof(position)) {
1218 // if infiniteLoop is false and last page is showing, disregard call
1219 if (!slider.settings.infiniteLoop && slider.active.last) return;
1228 // if infiniteLoop is false and last page is showing, disregard call
1229 if (!slider.settings.infiniteLoop && slider.active.index == 0) return;
1238 * - if true, auto controls state will not be updated
1241 // if an interval already exists, disregard call
1242 if(slider.interval) return;
1247 // if auto controls are displayed and preventControlUpdate is not true
1248 if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('stop');
1255 * - if true, auto controls state will not be updated
1258 // if no interval exists, disregard call
1259 if(!slider.interval) return;
1263 // if auto controls are displayed and preventControlUpdate is not true
1264 if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('start');
1290 if(!slider.settings.ticker) setSlidePosition();
1291 // if active.last was true before the screen resize, we want
1293 if (slider.active.last) slider.active.index = getPagerQty() - 1;
1294 // if the active index (page) no longer exists due to the resize, simply set the index as last
1295 if (slider.active.index >= getPagerQty()) slider.active.last = true;
1296 // if a pager is being displayed and a custom pager is not being used, update it
1297 if(slider.settings.pager && !slider.settings.pagerCustom){
1307 // don't do anything if slider has already been destroyed
1308 if(!slider.initialized) return;
1316 if(slider.controls.el) slider.controls.el.remove();
1317 if(slider.controls.next) slider.controls.next.remove();
1318 if(slider.controls.prev) slider.controls.prev.remove();
1319 if(slider.pagerEl) slider.pagerEl.remove();
1321 if(slider.controls.autoEl) slider.controls.autoEl.remove();
1323 if(slider.settings.responsive) $(window).unbind('resize', resizeWindow);
1330 if (settings != undefined) options = settings;