Brackets are an invalid character in attributes, for XHTML served as
text/html, which I guess accounts for most of jQuery usage anyway.
Looks like someone already updated the docs.

- ricardo

On Oct 20, 11:36 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> We got a ticket about how to select elements by an attribute with
> brackets.
> I replied with the common link to the FAQ and the reporter replied
> that the example in the docs doesn't work.
>
> I tried that myself, and indeed, that didn't work.
>
> http://dev.jquery.com/ticket/3443
>
> $('[name=foo[bar]]'); // Doesn't work
>
> $('[name=foo\\[bar\\]]'); // Should work, but doesn't
>
> $('[name="foo[bar]"]'); // Does work
>
> Now... I think the last option is good enough. But we need to update
> the docs.
>
> Anything to add ?
> Anyone volunteers to update the docs ?
>
> Cheers
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com/

Reply via email to