Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2014-10-29 12:09:35 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2014-10-29 12:09:35 +0300
commit872b751ad7a598ce97a4882b1b93eb3b78bdef8a (patch)
tree8f8225d5f0bfbbd4d042a8573c32fabb7b8de97d /assets/javascripts/bootstrap/carousel.js
parente018e193c7ce672abae245e2dab98834c35c9690 (diff)
rake convert
Diffstat (limited to 'assets/javascripts/bootstrap/carousel.js')
-rw-r--r--assets/javascripts/bootstrap/carousel.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js
index b688990..8884424 100644
--- a/assets/javascripts/bootstrap/carousel.js
+++ b/assets/javascripts/bootstrap/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 () {