PageSourceSearch

https://wade2.com/wp-content/themes/bridge/js/plugins/bootstrap.carousel_ver-6.8.2.js

js wade2.com collected 2026-10-04 18:28:32 UTC 8,191 bytes, 234 lines download raw bytes

vendor: 8,191 bytes, lines 1-234
1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10/* ========================================================================
11 * Bootstrap: carousel.js v3.0.0
12 * http://twbs.github.com/bootstrap/javascript.html#carousel
13 * ========================================================================
14 * Copyright 2012 Twitter, Inc.
15 *
16 * Licensed under the Apache License, Version 2.0 (the "License");
17 * you may not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 *
20 * http://www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an "AS IS" BASIS,
24 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 * ======================================================================== */
28
29
30+function ($) { "use strict";
31
32    // CAROUSEL CLASS DEFINITION
33    // =========================
34    var Carousel = function (element, options) {
35        this.$element    = $(element)
36        this.$indicators = this.$element.find('.carousel-indicators')
37        this.options     = options
38        this.paused      =
39            this.sliding     =
40                this.interval    =
41                    this.$active     =
42                        this.$items      = null
43
44        this.options.pause == 'hover' && this.$element
45            .on('mouseenter', $.proxy(this.pause, this))
46            .on('mouseleave', $.proxy(this.cycle, this))
47    }
48
49    Carousel.DEFAULTS = {
50        interval: 5000
51        , pause: 'hover'
52        , wrap: true
53    }
54
55    Carousel.prototype.cycle =  function (e) {
56        e || (this.paused = false)
57
58        this.interval && clearInterval(this.interval)
59
60        this.options.interval
61        && !this.paused
62        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
63
64        return this
65    }
66
67    Carousel.prototype.getActiveIndex = function () {
68        this.$active = this.$element.find('.item.active')
69        this.$items  = this.$active.parent().children()
70
71        return this.$items.index(this.$active)
72    }
73
74    Carousel.prototype.to = function (pos) {
75        var that        = this
76        var activeIndex = this.getActiveIndex()
77
78        if (pos > (this.$items.length - 1) || pos < 0) return
79
80        if (this.sliding)       return this.$element.one('slid', function () { that.to(pos) })
81        if (activeIndex == pos) return this.pause().cycle()
82
83        return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
84    }
85
86    Carousel.prototype.pause = function (e) {
87        e || (this.paused = true)
88
89        //if (this.$element.find('.next, .prev').length && $.support.transition.end) {
90        //this.$element.trigger($.support.transition.end)
91        this.cycle(true)
92        //}
93
94        this.interval = clearInterval(this.interval)
95
96        return this
97    }
98
99    Carousel.prototype.next = function () {
100        if (this.sliding) return
101        return this.slide('next')
102    }
103
104    Carousel.prototype.prev = function () {
105        if (this.sliding) return
106        return this.slide('prev')
107    }
108
109    Carousel.prototype.slide = function (type, next) {
110        var $active   = this.$element.find('.item.active')
111        var $next     = next || $active[type]()
112        var isCycling = this.interval
113        var direction = type == 'next' ? 'left' : 'right'
114        var fallback  = type == 'next' ? 'first' : 'last'
115        var that      = this
116
117        if (!$next.length) {
118            if (!this.options.wrap) return
119            $next = this.$element.find('.item')[fallback]()
120        }
121
122        this.sliding = true
123
124        isCycling && this.pause()
125
126        var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
127
128        if ($next.hasClass('active')) return
129
130        if (this.$indicators.length) {
131            this.$indicators.find('.active').removeClass('active')
132            this.$element.one('slid', function () {
133                var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
134                $nextIndicator && $nextIndicator.addClass('active')
135            })
136        }
137
138        var $this = this.$element.hasClass('header_effect');
139        if ($.support.transition && this.$element.hasClass('slide')) {
140            this.$element.trigger(e)
141            if (e.isDefaultPrevented()) return
142            var timer;
143
144
145            timer = setTimeout(function(){
146                checkSliderForHeaderStyle($next, $this);
147                $next.addClass(type)
148                $next[0].offsetWidth // force reflow
149                $active.addClass(direction)
150                $next.addClass(direction)
151                $active
152                    .one($.support.transition.end, function () {
153                        $next.removeClass([type, direction].join(' ')).removeClass('inactive').addClass('active')
154                        $active.removeClass(['active', direction].join(' ')).addClass('inactive')
155                        that.sliding = false
156                        setTimeout(function () { that.$element.trigger('slid') }, 0)
157                    })
158                    .emulateTransitionEnd(600)
159                clearTimeout(timer);
160            }, 1000);
161        } else {
162            this.$element.trigger(e)
163            if (e.isDefaultPrevented()) return
164            $active.removeClass('active')
165            $next.addClass('active')
166            this.sliding = false
167            this.$element.trigger('slid')
168        }
169
170        isCycling && this.cycle()
171
172        return this
173    }
174
175
176    // CAROUSEL PLUGIN DEFINITION
177    // ==========================
178
179    var old = $.fn.carousel
180
181    $.fn.carousel = function (option) {
182        return this.each(function () {
183            var $this   = $(this)
184            var data    = $this.data('bs.carousel')
185            var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
186            var action  = typeof option == 'string' ? option : options.slide
187
188            if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
189            if (typeof option == 'number') data.to(option)
190            else if (action) data[action]()
191            else if (options.interval) data.pause().cycle()
192        })
193    }
194
195    $.fn.carousel.Constructor = Carousel
196
197
198    // CAROUSEL NO CONFLICT
199    // ====================
200
201    $.fn.carousel.noConflict = function () {
202        $.fn.carousel = old
203        return this
204    }
205
206
207    // CAROUSEL DATA-API
208    // =================
209
210    $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
211        var $this   = $(this), href
212        var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
213        var options = $.extend({}, $target.data(), $this.data())
214        var slideIndex = $this.attr('data-slide-to')
215        if (slideIndex) options.interval = false
216
217        $target.carousel(options)
218
219        if (slideIndex = $this.attr('data-slide-to')) {
220            $target.data('bs.carousel').to(slideIndex)
221        }
222
223        e.preventDefault()
224    })
225
226    $(window).on('load', function () {
227        $('[data-ride="carousel"]').each(function () {
228            var $carousel = $(this)
229            $carousel.carousel($carousel.data())
230        })
231    })
232
233}(window.jQuery);
234}

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.