Have you tried $(element).is('.bar')? JK -----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Knutzen Sent: Tuesday, April 17, 2007 10:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] hasClass
How can I test if an element has a specific class? If I have <div class="foo bar"> How can I check if the element has class=bar Seems like it should be easy, but I am having troubles. Thanks -Geoff