diff options
author | Radomir Dopieralski <openstack@sheep.art.pl> | 2020-03-02 21:26:30 +0100 |
---|---|---|
committer | Radomir Dopieralski <openstack@sheep.art.pl> | 2020-03-16 14:01:36 +0000 |
commit | 1ba0b953862e953a8af9fc8a0f1c9ff372b169cf (patch) | |
tree | ef1e7d562e0b1f6e24004ba0318eca5b6f60edc6 /xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js | |
parent | ca68078e755659b32c61cdf9766fd1ea83c45485 (diff) | |
download | xstatic-bootstrap-scss-master.tar.gz |
Change-Id: I38c8d1114fd6e6629b4f3a16a85e3e35d8d8d3d6
Diffstat (limited to 'xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js')
-rw-r--r-- | xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js index 6ff954c..a5fcac3 100644 --- a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js +++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js @@ -1,8 +1,8 @@ /* ======================================================================== - * Bootstrap: carousel.js v3.3.7 - * http://getbootstrap.com/javascript/#carousel + * Bootstrap: carousel.js v3.4.1 + * https://getbootstrap.com/docs/3.4/javascript/#carousel * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -30,7 +30,7 @@ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } - Carousel.VERSION = '3.3.7' + Carousel.VERSION = '3.4.1' Carousel.TRANSITION_DURATION = 600 @@ -144,7 +144,9 @@ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" if ($.support.transition && this.$element.hasClass('slide')) { $next.addClass(type) - $next[0].offsetWidth // force reflow + if (typeof $next === 'object' && $next.length) { + $next[0].offsetWidth // force reflow + } $active.addClass(direction) $next.addClass(direction) $active @@ -206,10 +208,17 @@ // ================= var clickHandler = function (e) { - var href var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 + var href = $this.attr('href') + if (href) { + href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + } + + var target = $this.attr('data-target') || href + var $target = $(document).find(target) + if (!$target.hasClass('carousel')) return + var options = $.extend({}, $target.data(), $this.data()) var slideIndex = $this.attr('data-slide-to') if (slideIndex) options.interval = false |