diff options
| author | Jacob Thornton <[email protected]> | 2012-04-24 02:21:45 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-04-24 02:21:45 -0700 |
| commit | e659dc7e1be2e09cec34703dce8c737496e3504e (patch) | |
| tree | be3caed12a3de1218e1fd548f2564302e6c8193a /js/bootstrap-tab.js | |
| parent | 6506ede6323ee60d4d7f8171937d92141a64e09e (diff) | |
| parent | 839ef3a030b355d0f0c35d6c9e42ecba8b072036 (diff) | |
| download | bootstrap-e659dc7e1be2e09cec34703dce8c737496e3504e.tar.xz bootstrap-e659dc7e1be2e09cec34703dce8c737496e3504e.zip | |
Merge branch '2.0.3-wip'
Conflicts:
Makefile
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
Diffstat (limited to 'js/bootstrap-tab.js')
| -rw-r--r-- | js/bootstrap-tab.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/js/bootstrap-tab.js b/js/bootstrap-tab.js index b3938f671..88641de86 100644 --- a/js/bootstrap-tab.js +++ b/js/bootstrap-tab.js @@ -1,5 +1,5 @@ /* ======================================================== - * bootstrap-tab.js v2.0.2 + * bootstrap-tab.js v2.0.3 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. @@ -18,9 +18,10 @@ * ======================================================== */ -!function( $ ){ +!function ($) { + + "use strict"; // jshint ;_; - "use strict" /* TAB CLASS DEFINITION * ==================== */ @@ -39,6 +40,7 @@ , selector = $this.attr('data-target') , previous , $target + , e if (!selector) { selector = $this.attr('href') @@ -49,11 +51,14 @@ previous = $ul.find('.active a').last()[0] - $this.trigger({ - type: 'show' - , relatedTarget: previous + e = $.Event('show', { + relatedTarget: previous }) + $this.trigger(e) + + if (e.isDefaultPrevented()) return + $target = $(selector) this.activate($this.parent('li'), $ul) @@ -127,4 +132,4 @@ }) }) -}( window.jQuery );
\ No newline at end of file +}(window.jQuery);
\ No newline at end of file |
