Check if a jquery object has a particular class/id
Snippet
Yeah, kitt finished writing this at 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