diff options
| author | Mark Otto <[email protected]> | 2014-10-28 22:57:26 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-10-28 22:57:26 -0700 |
| commit | c4b053a0131e93a206429ee2575dd67fd9508e12 (patch) | |
| tree | be93b1e96719a75830a6ea6277ed5c042e9dad75 /js/carousel.js | |
| parent | bf3be5a456b3f6699a7832957dc0d1fbf6ac1590 (diff) | |
| parent | 45b59f4307da4c343c605abe41b4909ba632abf1 (diff) | |
| download | bootstrap-c4b053a0131e93a206429ee2575dd67fd9508e12.tar.xz bootstrap-c4b053a0131e93a206429ee2575dd67fd9508e12.zip | |
Merge branch 'master' into cursor_var
Diffstat (limited to 'js/carousel.js')
| -rw-r--r-- | js/carousel.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/carousel.js b/js/carousel.js index b68899009..8884424ef 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -207,7 +207,7 @@ // CAROUSEL DATA-API // ================= - $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + 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 @@ -223,7 +223,11 @@ } e.preventDefault() - }) + } + + $(document) + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { |
