summaryrefslogtreecommitdiff
path: root/bower_components/bootstrap/js/tab.js
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/js/tab.js')
-rw-r--r--bower_components/bootstrap/js/tab.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/bower_components/bootstrap/js/tab.js b/bower_components/bootstrap/js/tab.js
index 400cb7b8..c0e1e466 100644
--- a/bower_components/bootstrap/js/tab.js
+++ b/bower_components/bootstrap/js/tab.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: tab.js v3.1.1
+ * Bootstrap: tab.js v3.2.0
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -17,6 +17,8 @@
this.element = $(element)
}
+ Tab.VERSION = '3.2.0'
+
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
@@ -24,7 +26,7 @@
if (!selector) {
selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
if ($this.parent('li').hasClass('active')) return
@@ -40,7 +42,7 @@
var $target = $(selector)
- this.activate($this.parent('li'), $ul)
+ this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown.bs.tab',
@@ -79,7 +81,7 @@
transition ?
$active
- .one($.support.transition.end, next)
+ .one('bsTransitionEnd', next)
.emulateTransitionEnd(150) :
next()
@@ -90,9 +92,7 @@
// TAB PLUGIN DEFINITION
// =====================
- var old = $.fn.tab
-
- $.fn.tab = function ( option ) {
+ function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
@@ -102,6 +102,9 @@
})
}
+ var old = $.fn.tab
+
+ $.fn.tab = Plugin
$.fn.tab.Constructor = Tab
@@ -119,7 +122,7 @@
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
- $(this).tab('show')
+ Plugin.call($(this), 'show')
})
}(jQuery);