]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Dont use short jQuery methods 23876/head
authorvsn4ik <vsn4ik@gmail.com>
Fri, 8 Sep 2017 08:41:42 +0000 (11:41 +0300)
committervsn4ik <vsn4ik@gmail.com>
Fri, 8 Sep 2017 08:41:42 +0000 (11:41 +0300)
docs/4.0/components/list-group.md
docs/4.0/components/modal.md
docs/4.0/components/navs.md
docs/4.0/examples/offcanvas/offcanvas.js

index 5fad36d5a615826aab1fc77ee8d81521dc10a0bc..1a279658829f7603c5887fa1794c9ae5ee148aa0 100644 (file)
@@ -244,7 +244,7 @@ You can activate a list group navigation without writing any JavaScript by simpl
 Enable tabbable list item via JavaScript (each list item needs to be activated individually):
 
 {% highlight js %}
-$('#myList a').click(function (e) {
+$('#myList a').on('click', function (e) {
   e.preventDefault()
   $(this).tab('show')
 })
index a903cd88444cef72f45b10688b7952bf66d07e42..139e09ffadd574becaa76cba16fef4855fbf7cf4 100644 (file)
@@ -19,7 +19,7 @@ Before getting started with Bootstrap's modal component, be sure to read the fol
 
 {% highlight js %}
 $('#myModal').on('shown.bs.modal', function () {
-  $('#myInput').focus()
+  $('#myInput').trigger('focus')
 })
 {% endhighlight %}
 
index dc014a1ca63dfaba4fd8aea05b7c4971b8bd8098..a9fb5268b2ae346e1ec789df093dcafba87fddb3 100644 (file)
@@ -554,7 +554,7 @@ You can activate a tab or pill navigation without writing any JavaScript by simp
 Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
 
 {% highlight js %}
-$('#myTab a').click(function (e) {
+$('#myTab a').on('click', function (e) {
   e.preventDefault()
   $(this).tab('show')
 })
index d14cd68b87d7da438e659694ec7723d8bf24b99e..a89262a26aa42d16e7d9826e3b631ad34134ee69 100644 (file)
@@ -1,5 +1,5 @@
 $(document).ready(function () {
-  $('[data-toggle="offcanvas"]').click(function () {
+  $('[data-toggle="offcanvas"]').on('click', function () {
     $('.row-offcanvas').toggleClass('active')
   });
 });