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:
authorCarl Porth <badcarl@gmail.com>2012-09-28 02:00:02 +0400
committerCarl Porth <badcarl@gmail.com>2012-09-28 02:00:02 +0400
commite1f6458e3640a628cdb6b2e4c63950777d46e141 (patch)
treecf4f67f4a214999cfb5024f6fbe12697b2c3cc17 /js/bootstrap-modal.js
parent474471b83140350de320f3ba940bd7dd8326b32e (diff)
don't wait for ready when binding events to document
Diffstat (limited to 'js/bootstrap-modal.js')
-rw-r--r--js/bootstrap-modal.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index 8a40c2d4e6..0030ad7c50 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -215,21 +215,19 @@
/* MODAL DATA-API
* ============== */
- $(function () {
- $(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()
- })
- })
+ $(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); \ No newline at end of file