2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-21 13:24:08 +03:00

Use native pseudo-selectors instead of jQuery selectors (#24713)

This commit is contained in:
Vasilii Artemchuk
2017-11-09 08:51:19 +03:00
committed by XhmikosR
parent 75bdc6d962
commit 5a2d6c70f4
5 changed files with 46 additions and 46 deletions
+1 -1
View File
@@ -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:
+4 -4
View File
@@ -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
<script>
$(function () {
$('#myList a:last').tab('show')
$('#myList a:last-child').tab('show')
})
</script>
{% endhighlight %}
+4 -4
View File
@@ -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
<script>
$(function () {
$('#myTab a:last').tab('show')
$('#myTab li:last-child a').tab('show')
})
</script>
{% endhighlight %}