user784637
user784637

Reputation: 16092

How check if a particular element has a certain class?

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

Upvotes: 0

Views: 1264

Answers (2)

ShankarSangoli
ShankarSangoli

Reputation: 69905

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

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

Upvotes: 2

aletzo
aletzo

Reputation: 2481

$(selector).hasClass('whatclass')

Upvotes: 8

Related Questions