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
http://choangalvez.nom.es/

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

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


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

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

This is what I'm using for testing:

HTML:
p class=pare-0pare-0, a hreflang=es href=#hreflang=es/a/p
p class=fill-0 pare-1fill-0 pare-1 a hreflang=en
href=#hreflang=en/a/p
pNo class, a href=#no hreflang/a/p

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
http://choangalvez.nom.es/

___
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:p class=pare-0pare-0, a hreflang=es href=""
p class=fill-0 pare-1fill-0 pare-1 a hreflang=enhref="">pNo class, a href="" hreflang/a/p
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
http://choangalvez.nom.es/___jQuery mailing listdiscuss@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 Ⓙⓐⓚⓔ
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
 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 Ⓙⓐⓚⓔ
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/