The name of the class attribute is className, so you want:

$('#myid').attr('className');

- Richard

Richard D. Worth
http://rdworth.org/

On Sun, May 11, 2008 at 12:48 PM, Adwin Wijaya <[EMAIL PROTECTED]>
wrote:

>
> I have code .. to check what class in every id ..
>
> i found that if the class="", attr will return undefined ...
>
> example: className =  $('#myid').attr('class');
>
>
> I use Jquery 1.2.4b from ui.jquery.com
>
> is it the bug or it is the correct result from attr() ?
>

Reply via email to