]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #8569
authorJacob Thornton <jacobthornton@gmail.com>
Thu, 25 Jul 2013 03:21:23 +0000 (20:21 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Thu, 25 Jul 2013 03:21:23 +0000 (20:21 -0700)
dist/js/bootstrap.js
javascript.html
js/modal.js

index dbcb9a0c7b682bec2d8f14675d35bd3f6768629c..11ca6131017d9b282de047973f98f670bdf2ac02 100644 (file)
       .one('hide', function () {
         $this.is(':visible') && $this.focus()
       })
-    })
+  })
 
-    var $body = $(document.body)
-      .on('shown.bs.modal',  '.modal', function () { $body.addClass('modal-open') })
-      .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
+  var $body = $(document.body)
+    .on('shown.bs.modal',  '.modal', function () { $body.addClass('modal-open') })
+    .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
 
 }(window.jQuery);
 /* ========================================================================
index 72b37d4fb647e200718c4c74d5979f8c59852a76..23fe67719147194d7bba14d8e5516b44de3c4fc6 100644 (file)
@@ -29,14 +29,14 @@ lead: "Bring Bootstrap's components to life with over a dozen custom jQuery plug
     <h3 id="js-data-attrs">Data attributes</h3>
     <p>You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.</p>
 
-    <p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with <code>data-api</code>. This looks like this:
+    <p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the document namespaced with <code>data-api</code>. This looks like this:
 {% highlight js %}
-$('body').off('.data-api')
+$(document).off('.data-api')
 {% endhighlight %}
 
     <p>Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:</p>
 {% highlight js %}
-$('body').off('.alert.data-api')
+$(document).off('.alert.data-api')
 {% endhighlight %}
 
     <h3 id="js-programmatic-api">Programmatic API</h3>
index 5a234146e30d23039384e0ee2107909eca9fa9b2..4a89ba7eac67e06ab1f17779a7d3a680ac100f24 100644 (file)
       .one('hide', function () {
         $this.is(':visible') && $this.focus()
       })
-    })
+  })
 
-    var $body = $(document.body)
-      .on('shown.bs.modal',  '.modal', function () { $body.addClass('modal-open') })
-      .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
+  var $body = $(document.body)
+    .on('shown.bs.modal',  '.modal', function () { $body.addClass('modal-open') })
+    .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
 
 }(window.jQuery);