How can I select an element with multiple classes in jQuery? -
I want to select all the elements that have two classes a
and b
.
& lt; Element class = "ab" & gt;
So, only those elements are both classes.
When I $ (". A, .b")
it gives me a union, but I want intersection.
If you want intersection, just select the selectors simultaneously without spaces Type
$ ('a.b')
An element for which there is an ID with a
classes < Code> B and C
, you will type:
$ ('# abc')
Comments
Post a Comment