From: vsn4ik Date: Fri, 8 Sep 2017 08:41:42 +0000 (+0300) Subject: Dont use short jQuery methods X-Git-Tag: v4.0.0-beta.2~261^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b3097a4a13a9d15303cd6e144aad814dbeae12;p=thirdparty%2Fbootstrap.git Dont use short jQuery methods --- 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') }); });