Timeline for How can I select an element with multiple classes in jQuery?
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 16, 2023 at 6:24 | comment | added | Faegheh Mohammadian | Check these references :https://www.w3.org/TR/CSS21/selector.html%23id-selectors, https://web.dev/learn/css/selectors/ | |
Aug 29, 2022 at 16:42 | comment | added | Copas | What about the "or" case if I want to find elements with .a or .b? | |
Nov 25, 2018 at 21:26 | history | edited | Sasha Chedygov | CC BY-SA 4.0 |
Remove/reword the end part, as it's potentially confusing and doesn't add much to the answer
|
Nov 23, 2018 at 19:33 | history | edited | Just a learner | CC BY-SA 4.0 |
added 230 characters in body
|
Oct 17, 2018 at 5:50 | history | edited | Sasha Chedygov | CC BY-SA 4.0 |
Expand second example slightly
|
Oct 16, 2018 at 18:05 | history | edited | Sasha Chedygov | CC BY-SA 4.0 |
Clarify "intersection"
|
Sep 28, 2018 at 18:34 | review | Suggested edits | |||
Sep 28, 2018 at 19:14 | |||||
Jan 19, 2016 at 12:07 | review | Suggested edits | |||
Jan 19, 2016 at 12:36 | |||||
S Dec 12, 2015 at 15:21 | history | suggested | Michael | CC BY-SA 3.0 |
highlighted import note "without spaces"
|
Dec 12, 2015 at 14:03 | review | Suggested edits | |||
S Dec 12, 2015 at 15:21 | |||||
May 12, 2013 at 23:49 | comment | added | Sasha Chedygov |
@Shimmy: Yes. A space between two selectors means you're searching for descendants; i.e. .a .b searches for elements with class b that are descendants of an element with class a . So something like div a will only return a elements that are inside a div element.
|
|
S Mar 18, 2013 at 5:36 | history | edited | Michael0x2a | CC BY-SA 3.0 |
Improved Clarity
|
S Mar 18, 2013 at 5:36 | history | suggested | Cody Guldner | CC BY-SA 3.0 |
Improved Clarity
|
Mar 18, 2013 at 5:34 | review | Suggested edits | |||
Mar 18, 2013 at 5:36 | |||||
Dec 19, 2012 at 22:15 | review | Suggested edits | |||
Dec 19, 2012 at 22:18 | |||||
Aug 7, 2012 at 17:19 | comment | added | Sasha Chedygov |
@Flater: It was just for the sake of example. But it might be useful if the classes b and c are dynamically added, and you only want to select the element if it has those classes.
|
|
Jun 24, 2009 at 22:33 | vote | accept | Mladen | ||
Jun 24, 2009 at 22:30 | history | answered | Sasha Chedygov | CC BY-SA 2.5 |