aboutsummaryrefslogtreecommitdiff
path: root/docs/dist/js/bootstrap.js
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-10-23 05:23:29 +0200
committerHeinrich Fenkart <[email protected]>2014-10-23 05:23:29 +0200
commite0cea19cbc8a22d6d576a773028cf89519e40901 (patch)
treee23bee917c5767e84e12285150b892d2e55c3a96 /docs/dist/js/bootstrap.js
parent57e4b587828e79962dabe97e9e8ce3c231d7a820 (diff)
downloadbootstrap-e0cea19cbc8a22d6d576a773028cf89519e40901.tar.xz
bootstrap-e0cea19cbc8a22d6d576a773028cf89519e40901.zip
grunt
Diffstat (limited to 'docs/dist/js/bootstrap.js')
-rw-r--r--docs/dist/js/bootstrap.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js
index 7f405c202..b28f5fce6 100644
--- a/docs/dist/js/bootstrap.js
+++ b/docs/dist/js/bootstrap.js
@@ -1926,22 +1926,30 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if ($this.parent('li').hasClass('active')) return
- var previous = $ul.find('.active:last a')[0]
- var e = $.Event('show.bs.tab', {
- relatedTarget: previous
+ var $previous = $ul.find('.active:last a')
+ var hideEvent = $.Event('hide.bs.tab', {
+ relatedTarget: $this[0]
+ })
+ var showEvent = $.Event('show.bs.tab', {
+ relatedTarget: $previous[0]
})
- $this.trigger(e)
+ $previous.trigger(hideEvent)
+ $this.trigger(showEvent)
- if (e.isDefaultPrevented()) return
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
+ $previous.trigger({
+ type: 'hidden.bs.tab',
+ relatedTarget: $this[0]
+ })
$this.trigger({
type: 'shown.bs.tab',
- relatedTarget: previous
+ relatedTarget: $previous[0]
})
})
}