Re: [jQuery] Selectors..

2007-01-05 Thread Jörn Zaefferer
Ⓙⓐⓚⓔ schrieb:
> what happened to filter with a function param??? that sounded like a
> work-around for the regex.
>   
That is available and documented in the latest revision.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-05 Thread Brandon Aaron
On 1/5/07, spinnach <[EMAIL PROTECTED]> wrote:
> ..should we add this as a feature or enhancement ticket?

Please feel free to create a ticket (probably enhancement) for this if
you feel it is something you would like to see in the core.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-05 Thread spinnach
..should we add this as a feature or enhancement ticket?

Yehuda Katz wrote:
> Yep. That's one workaround. I personally like the idea of [EMAIL 
> PROTECTED]|z] though.
> 
> -- Yehuda
> 
> On 1/4/07, *Ⓙⓐⓚⓔ* < [EMAIL PROTECTED] > wrote:
> 
> what happened to filter with a function param??? that sounded like a
> work-around for the regex.
> 
> 
> On 1/4/07, Yehuda Katz <[EMAIL PROTECTED] >
> wrote:
>  > Allowing Regex is a non-trivial problem. These solutions, which
> target
>  > specific use-cases, are much more likely.
>  >
>  > -- Yehuda
>  >
>  >
> 
> ___
> jQuery mailing list
> discuss@jquery.com 
> http://jquery.com/discuss/
> 
> 
> 
> 
> -- 
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Yehuda Katz

Yep. That's one workaround. I personally like the idea of [EMAIL PROTECTED]|z] 
though.

-- Yehuda

On 1/4/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:


what happened to filter with a function param??? that sounded like a
work-around for the regex.


On 1/4/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> Allowing Regex is a non-trivial problem. These solutions, which target
> specific use-cases, are much more likely.
>
> -- Yehuda
>
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Ⓙⓐⓚⓔ
what happened to filter with a function param??? that sounded like a
work-around for the regex.


On 1/4/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> Allowing Regex is a non-trivial problem. These solutions, which target
> specific use-cases, are much more likely.
>
> -- Yehuda
>
>

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Yehuda Katz

Allowing Regex is a non-trivial problem. These solutions, which target
specific use-cases, are much more likely.

-- Yehuda

On 1/4/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:


wasn't there some chat about allowing a regex in the selection? or was
it a plugin?

I think it's a very good idea!

On 1/4/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> This is a very interesting request. I second the motion.
>
>
> On 1/4/07, spinnach <[EMAIL PROTECTED]> wrote:
> > ..that's basically the same as
> > $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the
> docs say using
> > :text is faster.. but it would be nice to have the ability to select
> > elements in such manner ( eg. $('[EMAIL PROTECTED]|bar]') or
> > $('[EMAIL PROTECTED]|bar]') )
> > i had a need for such things a few times..
> >
> > Mike Alsup wrote:
> > >>  do jquery selectors support something like 'select every
> [EMAIL PROTECTED]
> > >> OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can
> select
> > >> them like
> $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other
> method
> > >> could be faster, if supported, i think :)..
> > >
> > > I think you can do $(':text,:password');
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
>
> --
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>


--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Ⓙⓐⓚⓔ
wasn't there some chat about allowing a regex in the selection? or was
it a plugin?

I think it's a very good idea!

On 1/4/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> This is a very interesting request. I second the motion.
>
>
> On 1/4/07, spinnach <[EMAIL PROTECTED]> wrote:
> > ..that's basically the same as
> > $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the
> docs say using
> > :text is faster.. but it would be nice to have the ability to select
> > elements in such manner ( eg. $('[EMAIL PROTECTED]|bar]') or
> > $('[EMAIL PROTECTED]|bar]') )
> > i had a need for such things a few times..
> >
> > Mike Alsup wrote:
> > >>  do jquery selectors support something like 'select every
> [EMAIL PROTECTED]
> > >> OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can
> select
> > >> them like
> $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other
> method
> > >> could be faster, if supported, i think :)..
> > >
> > > I think you can do $(':text,:password');
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
>
> --
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Yehuda Katz

This is a very interesting request. I second the motion.

On 1/4/07, spinnach <[EMAIL PROTECTED]> wrote:


..that's basically the same as
$('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the docs say using
:text is faster.. but it would be nice to have the ability to select
elements in such manner ( eg. $('[EMAIL PROTECTED]|bar]') or
$('[EMAIL PROTECTED]|bar]') )
i had a need for such things a few times..

Mike Alsup wrote:
>>  do jquery selectors support something like 'select every
[EMAIL PROTECTED]
>> OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can
select
>> them like $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other
method
>> could be faster, if supported, i think :)..
>
> I think you can do $(':text,:password');
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread spinnach
..that's basically the same as 
$('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the docs say using 
:text is faster.. but it would be nice to have the ability to select 
elements in such manner ( eg. $('[EMAIL PROTECTED]|bar]') or 
$('[EMAIL PROTECTED]|bar]') )
i had a need for such things a few times..

Mike Alsup wrote:
>>  do jquery selectors support something like 'select every [EMAIL PROTECTED]
>> OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can select
>> them like $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other method
>> could be faster, if supported, i think :)..
> 
> I think you can do $(':text,:password');
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors..

2007-01-04 Thread Mike Alsup
>  do jquery selectors support something like 'select every [EMAIL PROTECTED]
> OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can select
> them like $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other method
> could be faster, if supported, i think :)..

I think you can do $(':text,:password');

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-19 Thread David Duymelinck
Choan C. Gálvez schreef:
> On 10/18/06, John Resig <[EMAIL PROTECTED]> wrote:
>   
>> Well, I don't doubt that people use the lang attribute as intended
>> (considering that I've never made a non-english site) - however,
>> there's certainly never been a need for the ~=  selector - which is
>> only remotely useful with lang-related attributes.
>> 
>
> But the class name isn't the only attribute which accepts
> space-separated values. There's the `%linkTypes;` [1] value type, used
> in `rel` and `rev` attributes.
>
> I can see a use for the `~=` selector in matching XFN [2] marked up links.
>
> It could be useful too when using custom XML.
>
> [1]: http://www.w3.org/TR/html4/sgml/dtd.html#LinkTypes
> [2]: http://gmpg.org/xfn/
>   
John is right about the lang attribute. There is no point of having 
multiple languages in the the same lang attribute. I dove in middle 
disscusion without reading the whole thread, that was my mistake.

-- 
David Duymelinck

[EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-19 Thread Choan C. Gálvez
On 10/18/06, John Resig <[EMAIL PROTECTED]> wrote:
> Well, I don't doubt that people use the lang attribute as intended
> (considering that I've never made a non-english site) - however,
> there's certainly never been a need for the ~=  selector - which is
> only remotely useful with lang-related attributes.

But the class name isn't the only attribute which accepts
space-separated values. There's the `%linkTypes;` [1] value type, used
in `rel` and `rev` attributes.

I can see a use for the `~=` selector in matching XFN [2] marked up links.

It could be useful too when using custom XML.

[1]: http://www.w3.org/TR/html4/sgml/dtd.html#LinkTypes
[2]: http://gmpg.org/xfn/
-- 
Choan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-18 Thread John Resig
> I've used the lang attribute of the html tag to extract the right
> language for the links in a  multilingual top level navigation. This is
> the code i use
>
> var currentLang = $("html").eq(0).attr("lang");
>
> I change the lang attribute with php. by doing that the site is also
> semantically correct. we have three languages here so everything i do
> has to be at least  multiple language ready.
>
> Some people use the things you least expect :)

Well, I don't doubt that people use the lang attribute as intended
(considering that I've never made a non-english site) - however,
there's certainly never been a need for the ~=  selector - which is
only remotely useful with lang-related attributes.

--John

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-18 Thread Choan C. Gálvez
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



and

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


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-18 Thread Klaus Hartl
David Duymelinck schrieb:
> John Resig schreef:
>>  Honestly, I've never seen anyone use
>> the lang attribute - let alone have a need to select it using a CSS
>> selector. Hence the reason for removing it.
>>   
> I've used the lang attribute of the html tag to extract the right 
> language for the links in a  multilingual top level navigation. This is 
> the code i use
> 
> var currentLang = $("html").eq(0).attr("lang");
> 
> I change the lang attribute with php. by doing that the site is also 
> semantically correct. we have three languages here so everything i do 
> has to be at least  multiple language ready.
> 
> Some people use the things you least expect :)

Yeah! I also use the attribute for an "Open new window" script that also 
adds a title (which of course is language dependent) to the links, that 
will open a new window.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-18 Thread David Duymelinck
John Resig schreef:
>  Honestly, I've never seen anyone use
> the lang attribute - let alone have a need to select it using a CSS
> selector. Hence the reason for removing it.
>   
I've used the lang attribute of the html tag to extract the right 
language for the links in a  multilingual top level navigation. This is 
the code i use

var currentLang = $("html").eq(0).attr("lang");

I change the lang attribute with php. by doing that the site is also 
semantically correct. we have three languages here so everything i do 
has to be at least  multiple language ready.

Some people use the things you least expect :)

-- 
David Duymelinck

[EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-17 Thread Ⓙⓐⓚⓔ
Ok... I recognized ^= , $=  and that was plenty for me! |= seemed
weird, and I thought ~= was for a regex.

On 10/17/06, John Resig <[EMAIL PROTECTED]> wrote:
> > when I saw hreflang, I assumed you supported any attr...  what
> > atttibutes do you support?
>
> Ah, you misunderstand me. Any attribute is supported - that's not the
> problem. The |= and ~= operators are not supported. For example ~=
> (which is used with hreflang and lang attributes) parses some strange
> combination of a hyphenated list. Honestly, I've never seen anyone use
> the lang attribute - let alone have a need to select it using a CSS
> selector. Hence the reason for removing it.
>
> --John
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-17 Thread John Resig
> when I saw hreflang, I assumed you supported any attr...  what
> atttibutes do you support?

Ah, you misunderstand me. Any attribute is supported - that's not the
problem. The |= and ~= operators are not supported. For example ~=
(which is used with hreflang and lang attributes) parses some strange
combination of a hyphenated list. Honestly, I've never seen anyone use
the lang attribute - let alone have a need to select it using a CSS
selector. Hence the reason for removing it.

--John

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-17 Thread Ⓙⓐⓚⓔ
John,

when I saw hreflang, I assumed you supported any attr...  what
atttibutes do you support?

is this another place where you should throw an exception?

On 10/17/06, John Resig <[EMAIL PROTECTED]> wrote:
> Hi Choan -
>
> > * 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
>
> 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?
>
> --John
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-17 Thread John Resig
Hi Choan -

> * 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

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?

--John

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selectors [EMAIL PROTECTED]|=val] and [EMAIL PROTECTED] Have they been removed?

2006-10-17 Thread Blair McKenzie
Have you tried putting quotes around the values (ie en, es, fill-0)?BlairOn 10/18/06, Choan C. Gálvez <
[EMAIL PROTECTED]> wrote:Hi all.While playing with CSS selectors, I've found some strange things (I'm
using the SVN version, rev 445):* Attribute selector [EMAIL PROTECTED] doesn't work (returns anyelement with a class name)* Attribute selector [EMAIL PROTECTED]|=en] doesn't work (returns any elementwith a hreflang attribute)
Has the support for these selectors been removed?This is what I'm using for testing:HTML:pare-0, fill-0 pare-1 href="">No class, 
jQuery:$("[EMAIL PROTECTED]|=en]").length; // 2, should be 1$("[EMAIL PROTECTED]|=es]").length; // 2, should be 1$("[EMAIL PROTECTED]").length; // 2, shoul be 1--Choan
___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/