diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-09-08 11:49:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-08 11:49:10 +0300 |
commit | cad22335ede2d2d9d0242f86cd859752bbfb14ea (patch) | |
tree | 64ec9dab7489660c48c9277a1d6ba99645704424 | |
parent | d3d06583c53c1a77a955b54f43498f5788e692d8 (diff) | |
parent | 84b3097a4a13a9d15303cd6e144aad814dbeae12 (diff) |
Merge pull request #23876 from vsn4ik/v4-dev-dont-use-short-jquery
Dont use short jQuery methods in documentations
-rw-r--r-- | docs/4.0/components/list-group.md | 2 | ||||
-rw-r--r-- | docs/4.0/components/modal.md | 2 | ||||
-rw-r--r-- | docs/4.0/components/navs.md | 2 | ||||
-rw-r--r-- | docs/4.0/examples/offcanvas/offcanvas.js | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/docs/4.0/components/list-group.md b/docs/4.0/components/list-group.md index 5fad36d5a6..1a27965882 100644 --- a/docs/4.0/components/list-group.md +++ b/docs/4.0/components/list-group.md @@ -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') }) diff --git a/docs/4.0/components/modal.md b/docs/4.0/components/modal.md index a903cd8844..139e09ffad 100644 --- a/docs/4.0/components/modal.md +++ b/docs/4.0/components/modal.md @@ -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 %} diff --git a/docs/4.0/components/navs.md b/docs/4.0/components/navs.md index dc014a1ca6..a9fb5268b2 100644 --- a/docs/4.0/components/navs.md +++ b/docs/4.0/components/navs.md @@ -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') }) diff --git a/docs/4.0/examples/offcanvas/offcanvas.js b/docs/4.0/examples/offcanvas/offcanvas.js index d14cd68b87..a89262a26a 100644 --- a/docs/4.0/examples/offcanvas/offcanvas.js +++ b/docs/4.0/examples/offcanvas/offcanvas.js @@ -1,5 +1,5 @@ $(document).ready(function () { - $('[data-toggle="offcanvas"]').click(function () { + $('[data-toggle="offcanvas"]').on('click', function () { $('.row-offcanvas').toggleClass('active') }); }); |