mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Independently delegate data-api selectors
Fixes #14462. Closes #14463 by merging it.
This commit is contained in:
committed by
Heinrich Fenkart
parent
94b544c229
commit
68b771a057
+6
-2
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user