1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-23 21:53:25 +02:00

add information about valid selectors (#27137)

This commit is contained in:
Johann-S
2018-08-31 21:00:29 +02:00
committed by GitHub
parent 54d86e6249
commit a3e45d8ced
3 changed files with 5 additions and 35 deletions

View File

@@ -35,8 +35,10 @@ $(document).off('.alert.data-api')
{% endhighlight %}
{% capture callout %}
##### Escaping selectors
If you use special selectors, for example: `collapse:Example`, be sure to escape them, because they'll be passed through jQuery.
## Selectors
Currently to query DOM elements we use the native methods `querySelector` and `querySelectorAll` for performance reasons, so you have to use [valid selectors](https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier).
If you use special selectors, for example: `collapse:Example` be sure to escape them.
{% endcapture %}
{% include callout.html content=callout type="warning" %}