vendor/assets/javascripts/twitter/bootstrap-tab.js in sass-twitter-bootstrap-2.1.1 vs vendor/assets/javascripts/twitter/bootstrap-tab.js in sass-twitter-bootstrap-2.2.1
- old
+ new
@@ -1,7 +1,7 @@
/* ========================================================
- * bootstrap-tab.js v2.1.1
+ * bootstrap-tab.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,11 +47,11 @@
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
- previous = $ul.find('.active a').last()[0]
+ previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
@@ -123,13 +123,11 @@
/* TAB DATA-API
* ============ */
- $(function () {
- $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
+ $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ $(this).tab('show')
})
}(window.jQuery);
\ No newline at end of file