I would like to know what selectors are available for these data attributes that come with HTML5.
Taking this piece of HTML as an example:
<ul data-group="Companies">
<li data-company="Microsoft"></li>
<li data-company="Google"></li>
<li data-company ="Facebook"></li>
</ul>
Are there selectors to get:
- All elements with
data-company="Microsoft"
below "Companies"
- All elements with
data-company!="Microsoft"
below "Companies"
- In other cases is it possible to use other selectors like "contains, less than, greater than, etc...".
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…