Check if a jquery object has a particular class/id
Snippet
Written with a loving hand by kitt some time around 18:47 on 19 September 2009
Use is() to check if a class exists on a jQuery element.
if ($(#elm).is('.checkthisclass')) { // #elm has the class } else { //#elm doesn't have the class }
Add new comment