aboutsummaryrefslogtreecommitdiff
path: root/js/tab.js
diff options
context:
space:
mode:
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);