Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-10-18 10:05:16 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-10-18 10:05:16 +0400
commit7f3b94c45315475a129ace3c22e122808c2dbcaa (patch)
tree0b963ce17c8bd8c5f43356da36015daee7295ede /docs/assets/js/bootstrap-modal.js
parent280d4aeb30aa6b29ec74bd801ad1be3fc05e01f4 (diff)
parente1f6458e3640a628cdb6b2e4c63950777d46e141 (diff)
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 'docs/assets/js/bootstrap-modal.js')
-rw-r--r--docs/assets/js/bootstrap-modal.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/docs/assets/js/bootstrap-modal.js b/docs/assets/js/bootstrap-modal.js
index d2a4878b3d..185519aaf8 100644
--- a/docs/assets/js/bootstrap-modal.js
+++ b/docs/assets/js/bootstrap-modal.js
@@ -214,21 +214,19 @@
/* MODAL DATA-API
* ============== */
- $(function () {
- $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
- var $this = $(this)
- , href = $this.attr('href')
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- e.preventDefault()
-
- $target
- .modal(option)
- .one('hide', function () {
- $this.focus()
- })
- })
+ $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ , href = $this.attr('href')
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
+
+ e.preventDefault()
+
+ $target
+ .modal(option)
+ .one('hide', function () {
+ $this.focus()
+ })
})
}(window.jQuery);