vendor/assets/javascripts/twitter/bootstrap/button.js in less-rails-bootstrap-2.1.1 vs vendor/assets/javascripts/twitter/bootstrap/button.js in less-rails-bootstrap-2.2.0

- old
+ new

@@ -1,7 +1,7 @@ /* ============================================================ - * bootstrap-button.js v2.1.1 + * bootstrap-button.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -83,14 +83,12 @@ /* BUTTON DATA-API * =============== */ - $(function () { - $('body').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