I want to select a bunch of span
s in a div
whose CSS contains a particular background color. How do I achieve this?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Adding a timeout to a render function in ReactJS
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
Use the attribute selector [attribute=value] to look for a certain attribute value.
if i understand the question correctly, the selector
[attribute=value]
will not work because<span>
does not contain an attribute "background-color". you can test that out quickly to confirm it won't match anything:given:
here's a snippet that will work: