PageSourceSearch

https://hado.com/IHIS/wp369/wp-content/plugins/cryout-serious-slider/resources/slider.js?ver=1.2.7

js hado.com collected 2026-09-24 23:02:50 UTC 10,533 bytes, 350 lines download raw bytes

vendor: 10,533 bytes, lines 1-350
1/*!
2 * Bootstrap v3.3.7 (http://getbootstrap.com)
3 * Copyright 2011-2015 Twitter, Inc.
4 * Licensed under the MIT license
5 */
6
7if (typeof jQuery === 'undefined') {
8  throw new Error('Bootstrap\'s JavaScript requires jQuery')
9}
10
11+function ($) {
12  'use strict';
13  var version = $.fn.jquery.split(' ')[0].split('.')
14  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
15    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
16  }
17}(jQuery);
18
19/* ========================================================================
20 * Bootstrap: transition.js v3.3.7
21 * http://getbootstrap.com/javascript/#transitions
22 * ========================================================================
23 * Copyright 2011-2015 Twitter, Inc.
24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25 * ======================================================================== */
26
27
28+function ($) {
29  'use strict';
30
31  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32  // ============================================================
33
34  function transitionEnd() {
35    var el = document.createElement('bootstrap')
36
37    var transEndEventNames = {
38      WebkitTransition : 'webkitTransitionEnd',
39      MozTransition    : 'transitionend',
40      OTransition      : 'oTransitionEnd otransitionend',
41      transition       : 'transitionend'
42    }
43
44    for (var name in transEndEventNames) {
45      if (el.style[name] !== undefined) {
46        return { end: transEndEventNames[name] }
47      }
48    }
49
50    return false // explicit for ie8 (._.)
51  }
52
53  // http://blog.alexmaccaw.com/css-transitions
54  $.fn.emulateTransitionEnd = function (duration) {
55    var called = false
56    var $el = this
57    $(this).one('bsTransitionEnd', function () { called = true })
58    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59    setTimeout(callback, duration)
60    return this
61  }
62
63  $(function () {
64    $.support.transition = transitionEnd()
65
66    if (!$.support.transition) return
67
68    $.event.special.bsTransitionEnd = {
69      bindType: $.support.transition.end,
70      delegateType: $.support.transition.end,
71      handle: function (e) {
72        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73      }
74    }
75  })
76
77}(jQuery);
78
79
80
81/* ========================================================================
82 * Bootstrap: carousel.js v3.3.7
83 * http://getbootstrap.com/javascript/#carousel
84 * ========================================================================
85 * Copyright 2011-2015 Twitter, Inc.
86 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
87 * ======================================================================== */
88
89
90+function ($) {
91  'use strict';
92
93  // CAROUSEL CLASS DEFINITION
94  // =========================
95
96  var Carousel = function (element, options) {
97    this.$element    = $(element)
98    this.$indicators = this.$element.find('.seriousslider-indicators-inside')
99    this.options     = options
100    this.paused      = null
101    this.sliding     = null
102    this.interval    = null
103    this.$active     = null
104    this.$items      = null
105
106    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
107
108    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
109      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
110      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
111  }
112
113  Carousel.VERSION  = '3.3.7'
114
115  Carousel.DEFAULTS = {
116    interval: 5000,
117	stransition: 600,
118    pause: 'hover',
119    wrap: true,
120    keyboard: true
121  }
122
123
124  Carousel.prototype.keydown = function (e) {
125    if (/input|textarea/i.test(e.target.tagName)) return
126    switch (e.which) {
127      case 37: this.prev(); break
128      case 39: this.next(); break
129      default: return
130    }
131
132    e.preventDefault()
133  }
134
135  Carousel.prototype.cycle = function (e) {
136    e || (this.paused = false)
137
138    this.interval && clearInterval(this.interval)
139
140    this.options.interval
141      && !this.paused
142      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
143
144    return this
145  }
146
147  Carousel.prototype.getItemIndex = function (item) {
148    this.$items = item.parent().children('.item')
149    return this.$items.index(item || this.$active)
150  }
151
152  Carousel.prototype.getItemForDirection = function (direction, active) {
153    var activeIndex = this.getItemIndex(active)
154    var willWrap = (direction == 'prev' && activeIndex === 0)
155                || (direction == 'next' && activeIndex == (this.$items.length - 1))
156    if (willWrap && !this.options.wrap) return active
157    var delta = direction == 'prev' ? -1 : 1
158    var itemIndex = (activeIndex + delta) % this.$items.length
159    return this.$items.eq(itemIndex)
160  }
161
162  Carousel.prototype.to = function (pos) {
163    var that        = this
164    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
165
166    if (pos > (this.$items.length - 1) || pos < 0) return
167
168    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
169    if (activeIndex == pos) return this.pause().cycle()
170
171    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
172  }
173
174  Carousel.prototype.pause = function (e) {
175    e || (this.paused = true)
176
177    if (this.$element.find('.next, .prev').length && $.support.transition) {
178      this.$element.trigger($.support.transition.end)
179      this.cycle(true)
180    }
181
182    this.interval = clearInterval(this.interval)
183
184    return this
185  }
186
187  Carousel.prototype.next = function () {
188    if (this.sliding) return
189    return this.slide('next')
190  }
191
192  Carousel.prototype.prev = function () {
193    if (this.sliding) return
194    return this.slide('prev')
195  }
196
197  Carousel.prototype.slide = function (type, next) {
198    var $active   = this.$element.find('.item.active')
199    var $next     = next || this.getItemForDirection(type, $active)
200    var isCycling = this.interval
201    var direction = type == 'next' ? 'left' : 'right'
202    var that      = this
203
204    if ($next.hasClass('active')) return (this.sliding = false)
205
206    var relatedTarget = $next[0]
207    var slideEvent = $.Event('slide.bs.carousel', {
208      relatedTarget: relatedTarget,
209      direction: direction
210    })
211    this.$element.trigger(slideEvent)
212    if (slideEvent.isDefaultPrevented()) return
213
214    this.sliding = true
215
216    isCycling && this.pause()
217
218    if (this.$indicators.length) {
219      this.$indicators.find('.active').removeClass('active')
220      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
221      $nextIndicator && $nextIndicator.addClass('active')
222    }
223
224    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
225    if ($.support.transition && this.$element.hasClass('seriousslider')) {
226      $next.addClass(type)
227      $next[0].offsetWidth // force reflow
228      $active.addClass(direction)
229      $next.addClass(direction)
230      $active
231        .one('bsTransitionEnd', function () {
232          $next.removeClass([type, direction].join(' ')).addClass('active')
233          $active.removeClass(['active', direction].join(' '))
234          that.sliding = false
235          setTimeout(function () {
236            that.$element.trigger(slidEvent)
237          }, 0)
238        })
239        .emulateTransitionEnd(this.options.stransition)
240		//.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
241    } else {
242      $active.removeClass('active')
243      $next.addClass('active')
244      this.sliding = false
245      this.$element.trigger(slidEvent)
246    }
247
248    isCycling && this.cycle()
249
250    return this
251  }
252
253
254  // CAROUSEL PLUGIN DEFINITION
255  // ==========================
256
257  function Plugin(option) {
258    return this.each(function () {
259      var $this   = $(this);
260      var data    = $this.data('bs.carousel');
261      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option);
262      var action  = typeof option == 'string' ? option : options.slide;
263	  //console.log(data);
264
265      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
266	   //console.log(data);
267      if (typeof option == 'number') data.to(option)
268      else if (action) data[action]()
269      else if (options.interval) data.pause().cycle()
270    })
271  }
272
273  var old = $.fn.carousel
274
275  $.fn.carousel             = Plugin
276  $.fn.carousel.Constructor = Carousel
277
278
279  // CAROUSEL NO CONFLICT
280  // ====================
281
282  $.fn.carousel.noConflict = function () {
283    $.fn.carousel = old
284    return this
285  }
286
287
288  // CAROUSEL DATA-API
289  // =================
290
291  var clickHandler = function (e) {
292    var href
293    var $this   = $(this)
294    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
295    if (!$target.hasClass('seriousslider')) return
296    var options = $.extend({}, $target.data(), $this.data())
297    var slideIndex = $this.attr('data-slide-to')
298    if (slideIndex) options.interval = false
299
300    Plugin.call($target, options)
301
302    if (slideIndex) {
303      $target.data('bs.carousel').to(slideIndex)
304    }
305
306    e.preventDefault()
307  }
308
309
310  $(document)
311    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
312    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
313
314  /*$(window).on('load', function () {
315    $('[data-ride="carousel"]').each(function () {
316      var $carousel = $(this)
317      Plugin.call($carousel, $carousel.data())
318    })
319  })*/
320
321}(jQuery);
322
323/* zoom helper function for responsiveness */
324/* jQuery.fn.cryZoom = function(level, origin) {
325	origin = origin ? origin : 'center center';
326	jQuery(this).data('zoom', level);
327	return jQuery(this).css({
328	//	'zoom': level,	// Doesn't work correctly for mobiles
329		'-moz-transform': 'scale('+ level+ ')',
330		'-moz-transform-origin': origin,
331		'-o-transform': 'scale('+ level+ ')',
332		'-o-transform-origin': origin,
333		'-webkit-transform': 'scale('+ level+ ')',
334		'-webkit-transform-origin': origin,
335		'transform': 'scale('+ level+ ')',
336		'transform-origin': origin
337	});
338}; */
339
340/* swipe support for mobile devices */
341jQuery(document).ready(function() {
342   jQuery(".cryout-serious-slider").on('swiperight', function() {
343      jQuery(this).carousel('prev');
344    });
345   jQuery(".cryout-serious-slider").on('swipeleft', function() {
346      jQuery(this).carousel('next');
347   });
348});
349
350/* FIN */

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.