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')  
< / Html>

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -