Thanks! Will this work if an object has several classes? E.g.

     <div class="widget red small">

Konstantin Käfer wrote:
> Just use $('#something').is('.large');
> 
> Note that you can specify arbitrary css selectors in the is()
> function, among them the dotClass selector. You can even write
> $('#something').is('ul.large.wide'); to check if it is an unordered
> list with the classes "huge" and "wide".
> 
> 2006/8/26, Roman <[EMAIL PROTECTED]>:
>> I was wondering if there is a way to check if an element has a certain
>> class attached to it? For example $('#something').hasClass('large')
>> would return true or false.
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to