you could use the .is() function:
$(element).is('.bar'); or if you need to access only elements with the .bar class you could use$('.bar').whatever()... $('div.bar') would be faster if you need only the divs with the .bar class..
dennis. Geoffrey Knutzen wrote:
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=barSeems like it should be easy, but I am having troubles.Thanks -Geoff