[jQuery] Re: selecting spans with an attribute of "for"

2009-03-31 Thread RobG
On Apr 1, 9:55 am, Ricardo wrote: Please only reply to me if you are commenting on something I posted (which is difficult to do as you continuously top post). Otherwise, reply to the OP (or whichever post you are replying to). > Even being invalid this is unexpected. Sizzle maps "for" to "ht

[jQuery] Re: selecting spans with an attribute of "for"

2009-03-31 Thread Captain Betty
Thanks everyone. Yes, I know the "for" attribute is reserved for labels. Reason I ask is that I'm using Validator and was trying to target a span for a group of check boxes where at least one needed to be selected to validate the form. I'll probably switch back to a label (which semantically ma

[jQuery] Re: selecting spans with an attribute of "for"

2009-03-31 Thread Ricardo
Even being invalid this is unexpected. Sizzle maps "for" to "htmlFor", because in labels the for value is held in the htmlFor property (for being a reserved word). If you had you could get it with $('span[for=tea]') in example. In your case you have to resort to $('span').filter(function(){

[jQuery] Re: selecting spans with an attribute of "for"

2009-03-31 Thread RobG
On Apr 1, 4:44 am, Captain Betty wrote: > Hi everyone. > > I have a weird issue with selecting spans with the “for” attribute. > jQuery doesn’t seem to want to select it if the span is physically on > the page. [...] > Is this a bug? What am I doing wrong in trying to select a span on the > pag