9

jQuery Class selector works well if you have a single class assigned to an element. What if I assign two classes to an element(Ex: <div class="one two">), how can I find that element if I know these two classes?

3

2 Answers 2

6

$("div.one.two")

Sign up to request clarification or add additional context in comments.

Comments

4
$('.one.two');

more on multiple selectors if you just did a search on SO first.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.