0

Does jquery have a boolean function to determine if a particular element has a certain class?

1
  • 1
    Type the exact text of your question into Google and the first result is your question, the second result is the .hasClass() function within the jQuery API reference. Also this is a duplicate of Determine if an element has a CSS class with jQuery Commented Feb 23, 2012 at 2:43

2 Answers 2

8
$(selector).hasClass('whatclass')
Sign up to request clarification or add additional context in comments.

Comments

2

http://api.jquery.com/hasClass/

Here you will get all the information you need along with samples.

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.