On 10/18/06, John Resig <[EMAIL PROTECTED]> wrote:
> Hi Choan -
Hi John, thanks for answering.
> > * Attribute selector [EMAIL PROTECTED] doesn't work (returns any
> > element with a class name)
> > * Attribute selector [EMAIL PROTECTED]|=en] doesn't work (returns any
> > element
> > with a hreflang attribute)
> >
> > Has the support for these selectors been removed?
>
> Yes, I removed support for those selectors, since they're virtually
> useless, in most respects. Finding an element by class is as simple
> as:
> foo.className
Obviously I wasn't using the selector for checking for a class name ;)
> and the lang-related stuff seemed just silly - I've never seen an
> actual, practical use for it. Were you attempting to use them for
> something, or just curious?
I was thinking about the possibility of creating a new selector for a
quite strange markup I'm working on. As I saw the `:anything` has been
extended by plugins, I thought it'd be interesting to write my own
extension to (punish me) use something like this:
[EMAIL PROTECTED]|=pare]
which should match both
<tr class="pare-0" />
and
<tr class="fill-0 pare-1 />
Anyway, I can select every `tr` and iterate through them, so... there
is a workaround simpler than what I intended to do.
But, forgetting that... there are two things that upset me:
1. Those two selectors were present in the docs at
<http://jquery.com/docs/Base/Expression/CSS/>. (I've just edited that
page.)
2. The behaviour is unexpected. If these selectors are not supported,
they shouldn't match anything, instead of matching every element which
has the attribute.
--
Choan
<http://choangalvez.nom.es/>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/