Layout von Websiten mit Bootstrap und Foundation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

carousel.js 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. /*!
  2. * Bootstrap carousel.js v4.5.0 (https://getbootstrap.com/)
  3. * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  4. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
  8. typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
  9. (global = global || self, global.Carousel = factory(global.jQuery, global.Util));
  10. }(this, (function ($, Util) { 'use strict';
  11. $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
  12. Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. return Constructor;
  26. }
  27. function _defineProperty(obj, key, value) {
  28. if (key in obj) {
  29. Object.defineProperty(obj, key, {
  30. value: value,
  31. enumerable: true,
  32. configurable: true,
  33. writable: true
  34. });
  35. } else {
  36. obj[key] = value;
  37. }
  38. return obj;
  39. }
  40. function ownKeys(object, enumerableOnly) {
  41. var keys = Object.keys(object);
  42. if (Object.getOwnPropertySymbols) {
  43. var symbols = Object.getOwnPropertySymbols(object);
  44. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  45. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  46. });
  47. keys.push.apply(keys, symbols);
  48. }
  49. return keys;
  50. }
  51. function _objectSpread2(target) {
  52. for (var i = 1; i < arguments.length; i++) {
  53. var source = arguments[i] != null ? arguments[i] : {};
  54. if (i % 2) {
  55. ownKeys(Object(source), true).forEach(function (key) {
  56. _defineProperty(target, key, source[key]);
  57. });
  58. } else if (Object.getOwnPropertyDescriptors) {
  59. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  60. } else {
  61. ownKeys(Object(source)).forEach(function (key) {
  62. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  63. });
  64. }
  65. }
  66. return target;
  67. }
  68. /**
  69. * ------------------------------------------------------------------------
  70. * Constants
  71. * ------------------------------------------------------------------------
  72. */
  73. var NAME = 'carousel';
  74. var VERSION = '4.5.0';
  75. var DATA_KEY = 'bs.carousel';
  76. var EVENT_KEY = "." + DATA_KEY;
  77. var DATA_API_KEY = '.data-api';
  78. var JQUERY_NO_CONFLICT = $.fn[NAME];
  79. var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  80. var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
  81. var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
  82. var SWIPE_THRESHOLD = 40;
  83. var Default = {
  84. interval: 5000,
  85. keyboard: true,
  86. slide: false,
  87. pause: 'hover',
  88. wrap: true,
  89. touch: true
  90. };
  91. var DefaultType = {
  92. interval: '(number|boolean)',
  93. keyboard: 'boolean',
  94. slide: '(boolean|string)',
  95. pause: '(string|boolean)',
  96. wrap: 'boolean',
  97. touch: 'boolean'
  98. };
  99. var DIRECTION_NEXT = 'next';
  100. var DIRECTION_PREV = 'prev';
  101. var DIRECTION_LEFT = 'left';
  102. var DIRECTION_RIGHT = 'right';
  103. var EVENT_SLIDE = "slide" + EVENT_KEY;
  104. var EVENT_SLID = "slid" + EVENT_KEY;
  105. var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
  106. var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
  107. var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
  108. var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
  109. var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
  110. var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
  111. var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
  112. var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
  113. var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
  114. var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
  115. var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
  116. var CLASS_NAME_CAROUSEL = 'carousel';
  117. var CLASS_NAME_ACTIVE = 'active';
  118. var CLASS_NAME_SLIDE = 'slide';
  119. var CLASS_NAME_RIGHT = 'carousel-item-right';
  120. var CLASS_NAME_LEFT = 'carousel-item-left';
  121. var CLASS_NAME_NEXT = 'carousel-item-next';
  122. var CLASS_NAME_PREV = 'carousel-item-prev';
  123. var CLASS_NAME_POINTER_EVENT = 'pointer-event';
  124. var SELECTOR_ACTIVE = '.active';
  125. var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
  126. var SELECTOR_ITEM = '.carousel-item';
  127. var SELECTOR_ITEM_IMG = '.carousel-item img';
  128. var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
  129. var SELECTOR_INDICATORS = '.carousel-indicators';
  130. var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
  131. var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
  132. var PointerType = {
  133. TOUCH: 'touch',
  134. PEN: 'pen'
  135. };
  136. /**
  137. * ------------------------------------------------------------------------
  138. * Class Definition
  139. * ------------------------------------------------------------------------
  140. */
  141. var Carousel = /*#__PURE__*/function () {
  142. function Carousel(element, config) {
  143. this._items = null;
  144. this._interval = null;
  145. this._activeElement = null;
  146. this._isPaused = false;
  147. this._isSliding = false;
  148. this.touchTimeout = null;
  149. this.touchStartX = 0;
  150. this.touchDeltaX = 0;
  151. this._config = this._getConfig(config);
  152. this._element = element;
  153. this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
  154. this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
  155. this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
  156. this._addEventListeners();
  157. } // Getters
  158. var _proto = Carousel.prototype;
  159. // Public
  160. _proto.next = function next() {
  161. if (!this._isSliding) {
  162. this._slide(DIRECTION_NEXT);
  163. }
  164. };
  165. _proto.nextWhenVisible = function nextWhenVisible() {
  166. // Don't call next when the page isn't visible
  167. // or the carousel or its parent isn't visible
  168. if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
  169. this.next();
  170. }
  171. };
  172. _proto.prev = function prev() {
  173. if (!this._isSliding) {
  174. this._slide(DIRECTION_PREV);
  175. }
  176. };
  177. _proto.pause = function pause(event) {
  178. if (!event) {
  179. this._isPaused = true;
  180. }
  181. if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
  182. Util.triggerTransitionEnd(this._element);
  183. this.cycle(true);
  184. }
  185. clearInterval(this._interval);
  186. this._interval = null;
  187. };
  188. _proto.cycle = function cycle(event) {
  189. if (!event) {
  190. this._isPaused = false;
  191. }
  192. if (this._interval) {
  193. clearInterval(this._interval);
  194. this._interval = null;
  195. }
  196. if (this._config.interval && !this._isPaused) {
  197. this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
  198. }
  199. };
  200. _proto.to = function to(index) {
  201. var _this = this;
  202. this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  203. var activeIndex = this._getItemIndex(this._activeElement);
  204. if (index > this._items.length - 1 || index < 0) {
  205. return;
  206. }
  207. if (this._isSliding) {
  208. $(this._element).one(EVENT_SLID, function () {
  209. return _this.to(index);
  210. });
  211. return;
  212. }
  213. if (activeIndex === index) {
  214. this.pause();
  215. this.cycle();
  216. return;
  217. }
  218. var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
  219. this._slide(direction, this._items[index]);
  220. };
  221. _proto.dispose = function dispose() {
  222. $(this._element).off(EVENT_KEY);
  223. $.removeData(this._element, DATA_KEY);
  224. this._items = null;
  225. this._config = null;
  226. this._element = null;
  227. this._interval = null;
  228. this._isPaused = null;
  229. this._isSliding = null;
  230. this._activeElement = null;
  231. this._indicatorsElement = null;
  232. } // Private
  233. ;
  234. _proto._getConfig = function _getConfig(config) {
  235. config = _objectSpread2(_objectSpread2({}, Default), config);
  236. Util.typeCheckConfig(NAME, config, DefaultType);
  237. return config;
  238. };
  239. _proto._handleSwipe = function _handleSwipe() {
  240. var absDeltax = Math.abs(this.touchDeltaX);
  241. if (absDeltax <= SWIPE_THRESHOLD) {
  242. return;
  243. }
  244. var direction = absDeltax / this.touchDeltaX;
  245. this.touchDeltaX = 0; // swipe left
  246. if (direction > 0) {
  247. this.prev();
  248. } // swipe right
  249. if (direction < 0) {
  250. this.next();
  251. }
  252. };
  253. _proto._addEventListeners = function _addEventListeners() {
  254. var _this2 = this;
  255. if (this._config.keyboard) {
  256. $(this._element).on(EVENT_KEYDOWN, function (event) {
  257. return _this2._keydown(event);
  258. });
  259. }
  260. if (this._config.pause === 'hover') {
  261. $(this._element).on(EVENT_MOUSEENTER, function (event) {
  262. return _this2.pause(event);
  263. }).on(EVENT_MOUSELEAVE, function (event) {
  264. return _this2.cycle(event);
  265. });
  266. }
  267. if (this._config.touch) {
  268. this._addTouchEventListeners();
  269. }
  270. };
  271. _proto._addTouchEventListeners = function _addTouchEventListeners() {
  272. var _this3 = this;
  273. if (!this._touchSupported) {
  274. return;
  275. }
  276. var start = function start(event) {
  277. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  278. _this3.touchStartX = event.originalEvent.clientX;
  279. } else if (!_this3._pointerEvent) {
  280. _this3.touchStartX = event.originalEvent.touches[0].clientX;
  281. }
  282. };
  283. var move = function move(event) {
  284. // ensure swiping with one touch and not pinching
  285. if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
  286. _this3.touchDeltaX = 0;
  287. } else {
  288. _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
  289. }
  290. };
  291. var end = function end(event) {
  292. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  293. _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
  294. }
  295. _this3._handleSwipe();
  296. if (_this3._config.pause === 'hover') {
  297. // If it's a touch-enabled device, mouseenter/leave are fired as
  298. // part of the mouse compatibility events on first tap - the carousel
  299. // would stop cycling until user tapped out of it;
  300. // here, we listen for touchend, explicitly pause the carousel
  301. // (as if it's the second time we tap on it, mouseenter compat event
  302. // is NOT fired) and after a timeout (to allow for mouse compatibility
  303. // events to fire) we explicitly restart cycling
  304. _this3.pause();
  305. if (_this3.touchTimeout) {
  306. clearTimeout(_this3.touchTimeout);
  307. }
  308. _this3.touchTimeout = setTimeout(function (event) {
  309. return _this3.cycle(event);
  310. }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
  311. }
  312. };
  313. $(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
  314. return e.preventDefault();
  315. });
  316. if (this._pointerEvent) {
  317. $(this._element).on(EVENT_POINTERDOWN, function (event) {
  318. return start(event);
  319. });
  320. $(this._element).on(EVENT_POINTERUP, function (event) {
  321. return end(event);
  322. });
  323. this._element.classList.add(CLASS_NAME_POINTER_EVENT);
  324. } else {
  325. $(this._element).on(EVENT_TOUCHSTART, function (event) {
  326. return start(event);
  327. });
  328. $(this._element).on(EVENT_TOUCHMOVE, function (event) {
  329. return move(event);
  330. });
  331. $(this._element).on(EVENT_TOUCHEND, function (event) {
  332. return end(event);
  333. });
  334. }
  335. };
  336. _proto._keydown = function _keydown(event) {
  337. if (/input|textarea/i.test(event.target.tagName)) {
  338. return;
  339. }
  340. switch (event.which) {
  341. case ARROW_LEFT_KEYCODE:
  342. event.preventDefault();
  343. this.prev();
  344. break;
  345. case ARROW_RIGHT_KEYCODE:
  346. event.preventDefault();
  347. this.next();
  348. break;
  349. }
  350. };
  351. _proto._getItemIndex = function _getItemIndex(element) {
  352. this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
  353. return this._items.indexOf(element);
  354. };
  355. _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
  356. var isNextDirection = direction === DIRECTION_NEXT;
  357. var isPrevDirection = direction === DIRECTION_PREV;
  358. var activeIndex = this._getItemIndex(activeElement);
  359. var lastItemIndex = this._items.length - 1;
  360. var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
  361. if (isGoingToWrap && !this._config.wrap) {
  362. return activeElement;
  363. }
  364. var delta = direction === DIRECTION_PREV ? -1 : 1;
  365. var itemIndex = (activeIndex + delta) % this._items.length;
  366. return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
  367. };
  368. _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
  369. var targetIndex = this._getItemIndex(relatedTarget);
  370. var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
  371. var slideEvent = $.Event(EVENT_SLIDE, {
  372. relatedTarget: relatedTarget,
  373. direction: eventDirectionName,
  374. from: fromIndex,
  375. to: targetIndex
  376. });
  377. $(this._element).trigger(slideEvent);
  378. return slideEvent;
  379. };
  380. _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
  381. if (this._indicatorsElement) {
  382. var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
  383. $(indicators).removeClass(CLASS_NAME_ACTIVE);
  384. var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
  385. if (nextIndicator) {
  386. $(nextIndicator).addClass(CLASS_NAME_ACTIVE);
  387. }
  388. }
  389. };
  390. _proto._slide = function _slide(direction, element) {
  391. var _this4 = this;
  392. var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  393. var activeElementIndex = this._getItemIndex(activeElement);
  394. var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
  395. var nextElementIndex = this._getItemIndex(nextElement);
  396. var isCycling = Boolean(this._interval);
  397. var directionalClassName;
  398. var orderClassName;
  399. var eventDirectionName;
  400. if (direction === DIRECTION_NEXT) {
  401. directionalClassName = CLASS_NAME_LEFT;
  402. orderClassName = CLASS_NAME_NEXT;
  403. eventDirectionName = DIRECTION_LEFT;
  404. } else {
  405. directionalClassName = CLASS_NAME_RIGHT;
  406. orderClassName = CLASS_NAME_PREV;
  407. eventDirectionName = DIRECTION_RIGHT;
  408. }
  409. if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
  410. this._isSliding = false;
  411. return;
  412. }
  413. var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
  414. if (slideEvent.isDefaultPrevented()) {
  415. return;
  416. }
  417. if (!activeElement || !nextElement) {
  418. // Some weirdness is happening, so we bail
  419. return;
  420. }
  421. this._isSliding = true;
  422. if (isCycling) {
  423. this.pause();
  424. }
  425. this._setActiveIndicatorElement(nextElement);
  426. var slidEvent = $.Event(EVENT_SLID, {
  427. relatedTarget: nextElement,
  428. direction: eventDirectionName,
  429. from: activeElementIndex,
  430. to: nextElementIndex
  431. });
  432. if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
  433. $(nextElement).addClass(orderClassName);
  434. Util.reflow(nextElement);
  435. $(activeElement).addClass(directionalClassName);
  436. $(nextElement).addClass(directionalClassName);
  437. var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
  438. if (nextElementInterval) {
  439. this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
  440. this._config.interval = nextElementInterval;
  441. } else {
  442. this._config.interval = this._config.defaultInterval || this._config.interval;
  443. }
  444. var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
  445. $(activeElement).one(Util.TRANSITION_END, function () {
  446. $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
  447. $(activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
  448. _this4._isSliding = false;
  449. setTimeout(function () {
  450. return $(_this4._element).trigger(slidEvent);
  451. }, 0);
  452. }).emulateTransitionEnd(transitionDuration);
  453. } else {
  454. $(activeElement).removeClass(CLASS_NAME_ACTIVE);
  455. $(nextElement).addClass(CLASS_NAME_ACTIVE);
  456. this._isSliding = false;
  457. $(this._element).trigger(slidEvent);
  458. }
  459. if (isCycling) {
  460. this.cycle();
  461. }
  462. } // Static
  463. ;
  464. Carousel._jQueryInterface = function _jQueryInterface(config) {
  465. return this.each(function () {
  466. var data = $(this).data(DATA_KEY);
  467. var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data());
  468. if (typeof config === 'object') {
  469. _config = _objectSpread2(_objectSpread2({}, _config), config);
  470. }
  471. var action = typeof config === 'string' ? config : _config.slide;
  472. if (!data) {
  473. data = new Carousel(this, _config);
  474. $(this).data(DATA_KEY, data);
  475. }
  476. if (typeof config === 'number') {
  477. data.to(config);
  478. } else if (typeof action === 'string') {
  479. if (typeof data[action] === 'undefined') {
  480. throw new TypeError("No method named \"" + action + "\"");
  481. }
  482. data[action]();
  483. } else if (_config.interval && _config.ride) {
  484. data.pause();
  485. data.cycle();
  486. }
  487. });
  488. };
  489. Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
  490. var selector = Util.getSelectorFromElement(this);
  491. if (!selector) {
  492. return;
  493. }
  494. var target = $(selector)[0];
  495. if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
  496. return;
  497. }
  498. var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
  499. var slideIndex = this.getAttribute('data-slide-to');
  500. if (slideIndex) {
  501. config.interval = false;
  502. }
  503. Carousel._jQueryInterface.call($(target), config);
  504. if (slideIndex) {
  505. $(target).data(DATA_KEY).to(slideIndex);
  506. }
  507. event.preventDefault();
  508. };
  509. _createClass(Carousel, null, [{
  510. key: "VERSION",
  511. get: function get() {
  512. return VERSION;
  513. }
  514. }, {
  515. key: "Default",
  516. get: function get() {
  517. return Default;
  518. }
  519. }]);
  520. return Carousel;
  521. }();
  522. /**
  523. * ------------------------------------------------------------------------
  524. * Data Api implementation
  525. * ------------------------------------------------------------------------
  526. */
  527. $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
  528. $(window).on(EVENT_LOAD_DATA_API, function () {
  529. var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
  530. for (var i = 0, len = carousels.length; i < len; i++) {
  531. var $carousel = $(carousels[i]);
  532. Carousel._jQueryInterface.call($carousel, $carousel.data());
  533. }
  534. });
  535. /**
  536. * ------------------------------------------------------------------------
  537. * jQuery
  538. * ------------------------------------------------------------------------
  539. */
  540. $.fn[NAME] = Carousel._jQueryInterface;
  541. $.fn[NAME].Constructor = Carousel;
  542. $.fn[NAME].noConflict = function () {
  543. $.fn[NAME] = JQUERY_NO_CONFLICT;
  544. return Carousel._jQueryInterface;
  545. };
  546. return Carousel;
  547. })));
  548. //# sourceMappingURL=carousel.js.map