From 5a2d6c70f4115dee7edfa713f4ff2c2f2cef24da Mon Sep 17 00:00:00 2001 From: Vasilii Artemchuk Date: Thu, 9 Nov 2017 08:51:19 +0300 Subject: Use native pseudo-selectors instead of jQuery selectors (#24713) --- docs/4.0/components/alerts.md | 2 +- docs/4.0/components/list-group.md | 8 ++++---- docs/4.0/components/navs.md | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/4.0/components/alerts.md b/docs/4.0/components/alerts.md index aa6dfbecc..4ad1d0dea 100644 --- a/docs/4.0/components/alerts.md +++ b/docs/4.0/components/alerts.md @@ -73,7 +73,7 @@ You can see this in action with a live demo: Enable dismissal of an alert via JavaScript: {% highlight js %} -$(".alert").alert() +$('.alert').alert() {% endhighlight %} Or with `data` attributes on a button **within the alert**, as demonstrated above: diff --git a/docs/4.0/components/list-group.md b/docs/4.0/components/list-group.md index 2d5b4f16e..0df1ed637 100644 --- a/docs/4.0/components/list-group.md +++ b/docs/4.0/components/list-group.md @@ -254,9 +254,9 @@ You can activate individual list item in several ways: {% highlight js %} $('#myList a[href="#profile"]').tab('show') // Select tab by name -$('#myList a:first').tab('show') // Select first tab -$('#myList a:last').tab('show') // Select last tab -$('#myList li:eq(2) a').tab('show') // Select third tab (0-indexed) +$('#myList a:first-child').tab('show') // Select first tab +$('#myList a:last-child').tab('show') // Select last tab +$('#myList a:nth-child(3)').tab('show') // Select third tab {% endhighlight %} ### Fade effect @@ -295,7 +295,7 @@ Activates a list item element and content container. Tab should have either a `d {% endhighlight %} diff --git a/docs/4.0/components/navs.md b/docs/4.0/components/navs.md index 1a22b3bcf..cdba094aa 100644 --- a/docs/4.0/components/navs.md +++ b/docs/4.0/components/navs.md @@ -522,9 +522,9 @@ You can activate individual tabs in several ways: {% highlight js %} $('#myTab a[href="#profile"]').tab('show') // Select tab by name -$('#myTab a:first').tab('show') // Select first tab -$('#myTab a:last').tab('show') // Select last tab -$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed) +$('#myTab li:first-child a').tab('show') // Select first tab +$('#myTab li:last-child a').tab('show') // Select last tab +$('#myTab li:nth-child(3) a').tab('show') // Select third tab {% endhighlight %} ### Fade effect @@ -574,7 +574,7 @@ Activates a tab element and content container. Tab should have either a `data-ta {% endhighlight %} -- cgit v1.2.3