I wonder, how do we know if it is XML snippet we are working on or
just an HTML snippet?
--
Brandon Aaron
On 1/31/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Benjamin Sterling schrieb:
> > This tells me that it is pulling the right things (I assume) but when
> > I add:
> > $.log($('[EMAIL PROTECTED]', doc).attr('for'));
> > $.log($('[EMAIL PROTECTED]', doc).attr('for'));
> >
> > I get undefined for them both. But if I change for to whatfor, it
> > works. Ultimately I can stick with whatfor at the attribute, but why
> > would that mater?
> jQuery has a fix in attr to change "for" to "htmlFor", which is correct
> for normal HTML document, but of course wrong for XML documents. "class"
> is transformed to "className".
>
> It may be worth checking if the element passed into jQuery.attr is a
> element from an XML document. If you think so, would be report that as a
> bug/enhancement?
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/