diff options
| author | Jacob Thornton <[email protected]> | 2012-10-17 23:05:16 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-10-17 23:05:16 -0700 |
| commit | 7f3b94c45315475a129ace3c22e122808c2dbcaa (patch) | |
| tree | 0b963ce17c8bd8c5f43356da36015daee7295ede /js/bootstrap-collapse.js | |
| parent | 280d4aeb30aa6b29ec74bd801ad1be3fc05e01f4 (diff) | |
| parent | e1f6458e3640a628cdb6b2e4c63950777d46e141 (diff) | |
| download | bootstrap-7f3b94c45315475a129ace3c22e122808c2dbcaa.tar.xz bootstrap-7f3b94c45315475a129ace3c22e122808c2dbcaa.zip | |
Merge branch 'delegate-api-to-document' of git://github.com/badcarl/bootstrap into badcarl-delegate-api-to-document
Conflicts:
js/bootstrap-carousel.js
Diffstat (limited to 'js/bootstrap-collapse.js')
| -rw-r--r-- | js/bootstrap-collapse.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 734575800..392e486a8 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -143,16 +143,14 @@ /* COLLAPSIBLE DATA-API * ==================== */ - $(function () { - $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) }) }(window.jQuery);
\ No newline at end of file |
