[jquery-dev] Re: Bug? attr(name) return false in IE8

2009-08-27 Thread David Zhou
Couldn't you do: if(!!$(ele).attr('disabled')) { //stuff } -- dz On Thu, Aug 27, 2009 at 1:15 PM, William Chang wrote: > > Hey Matt, > I understand now. Thanks! > > So, how do you avoid using attr() when you need to check for an > attribute in the element? And, getting the value from an

[jquery-dev] Re: Bug? attr(name) return false in IE8

2009-08-27 Thread Matt Kruse
On Aug 27, 11:16 am, William Chang wrote: > I don't think the attribute is defined by default, after I did some > more testing. I find the value return is not consistent between > Firefox and IE8 (and probably previous versions of Microsoft Internet > Explorer). First of all, the attr() function

[jquery-dev] Re: Bug? attr(name) return false in IE8

2009-08-27 Thread William Chang
Hey Matt, I understand now. Thanks! So, how do you avoid using attr() when you need to check for an attribute in the element? And, getting the value from an attribute? Sincerely, William Chang http://www.williamchang.org http://www.babybluebox.com On Aug 27, 12:24 pm, Matt Kruse wrote: > On Au

[jquery-dev] Re: Bug? attr(name) return false in IE8

2009-08-27 Thread William Chang
I don't think the attribute is defined by default, after I did some more testing. I find the value return is not consistent between Firefox and IE8 (and probably previous versions of Microsoft Internet Explorer). Please do this simple test with a page that has jQuery and then input the console of

[jquery-dev] Re: Bug? attr(name) return false in IE8

2009-08-27 Thread ludovic
I don't think it is a bug. I'd rather think you've tried with attributes that are defined by default. To take your example, "disabled" attribute exists for html elements and is equal to false by default, so it is normal that it'll return false rather than undefined. Regards Ludovic --~--~--