aboutsummaryrefslogtreecommitdiff
path: root/js/tab.js
diff options
context:
space:
mode:
authorBen-Russell <[email protected]>2014-08-26 14:34:21 -0700
committerHeinrich Fenkart <[email protected]>2014-10-29 04:54:53 +0100
commit68b771a057b60ca5740cf9a1b0f8f9ec73e5dc56 (patch)
tree51bd082eedc237e1aca1e9bd532f4e7c83292709 /js/tab.js
parent94b544c22940d8048e7ecda9f3484583894f45c5 (diff)
downloadbootstrap-68b771a057b60ca5740cf9a1b0f8f9ec73e5dc56.tar.xz
bootstrap-68b771a057b60ca5740cf9a1b0f8f9ec73e5dc56.zip
Independently delegate data-api selectors
Fixes #14462. Closes #14463 by merging it.
Diffstat (limited to 'js/tab.js')
-rw-r--r--js/tab.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/tab.js b/js/tab.js
index dd307a424..5c09da49b 100644
--- a/js/tab.js
+++ b/js/tab.js
@@ -141,9 +141,13 @@
// TAB DATA-API
// ============
- $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
- })
+ }
+
+ $(document)
+ .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
+ .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);