i have the following classes applied to a span tag :
c1
i want to check whether c_2 (any particular class) is applied or not using js
i have the following classes applied to a span tag :
c1
i want to check whether c_2 (any particular class) is applied or not using js
Use jQuery JavaScript library and things like these are all already implemented in there. You could use the .hasClass()
method to check whether an element has a css class