diff options
author | Carl Porth <badcarl@gmail.com> | 2012-09-28 02:00:02 +0400 |
---|---|---|
committer | Carl Porth <badcarl@gmail.com> | 2012-09-28 02:00:02 +0400 |
commit | e1f6458e3640a628cdb6b2e4c63950777d46e141 (patch) | |
tree | cf4f67f4a214999cfb5024f6fbe12697b2c3cc17 /js/bootstrap-button.js | |
parent | 474471b83140350de320f3ba940bd7dd8326b32e (diff) |
don't wait for ready when binding events to document
Diffstat (limited to 'js/bootstrap-button.js')
-rw-r--r-- | js/bootstrap-button.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js index 4c0b725c7a..dbb2c08ed3 100644 --- a/js/bootstrap-button.js +++ b/js/bootstrap-button.js @@ -85,12 +85,10 @@ /* BUTTON DATA-API * =============== */ - $(function () { - $(document).on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') }) }(window.jQuery);
\ No newline at end of file |