From e1f6458e3640a628cdb6b2e4c63950777d46e141 Mon Sep 17 00:00:00 2001 From: Carl Porth Date: Thu, 27 Sep 2012 15:00:02 -0700 Subject: don't wait for ready when binding events to document --- js/bootstrap-button.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'js/bootstrap-button.js') 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 -- cgit v1.2.3