diff options
author | fat <fat@folders.local> | 2015-05-11 05:45:38 +0300 |
---|---|---|
committer | fat <fat@folders.local> | 2015-05-11 05:45:38 +0300 |
commit | ca9c850ebbfc880dc5021b451ffc9fa12184ff87 (patch) | |
tree | 8db34e73d402c3f71fd2e8c853b7fddf6cee33d6 /js/src/carousel.js | |
parent | bbb97a8660639002e70b1786e595ef9171bfecc6 (diff) |
add getters for Version and Default where applicable
add modal my gawd
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r-- | js/src/carousel.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index 08476d666b..bce51d7fde 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -23,7 +23,7 @@ const Carousel = (($) => { const JQUERY_NO_CONFLICT = $.fn[NAME] const TRANSITION_DURATION = 600 - const Defaults = { + const Default = { interval : 5000, keyboard : true, slide : false, @@ -72,7 +72,6 @@ const Carousel = (($) => { class Carousel { constructor(element, config) { - this._items = null this._interval = null this._activeElement = null @@ -85,7 +84,17 @@ const Carousel = (($) => { this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0] this._addEventListeners() + } + + + // getters + + static get VERSION() { + return VERSION + } + static get Default() { + return Default } @@ -331,7 +340,7 @@ const Carousel = (($) => { static _jQueryInterface(config) { return this.each(function () { let data = $(this).data(DATA_KEY) - let _config = $.extend({}, Defaults, $(this).data()) + let _config = $.extend({}, Default, $(this).data()) if (typeof config === 'object') { $.extend(_config, config) |