[jQuery] Re: Excluding an element part of a selection

2007-08-11 Thread David Garcia Ortega
Hi guys, Thanks a lot for your answers. It works fine now! Thanks again, David. On 10 ago, 19:28, Klaus Hartl [EMAIL PROTECTED] wrote: Dan G. Switzer, II wrote: yes, sorry, it works if you include the for= bit.. if you leave it out (and write it like this, which is also 100%

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread spinnach
Dan G. Switzer, II wrote: David, I have a question about selectors. First of all, I have the following html: div id=content a href=# input type=checkbox name=option1 value=Novedad1 Novedad 1: HOla holaaa /a

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread Dan G. Switzer, II
yes, sorry, it works if you include the for= bit.. if you leave it out (and write it like this, which is also 100% valid), clicking on the label won't work in ie6.. not sure about ie7.. in firefox it works: label Name input type=checkbox name=option id=option value=value / /label That's

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread spinnach
Dan G. Switzer, II wrote: Denis, label for=idOption1 input type=checkbox name=option1 id=idOption1 value=Novedad1 / Novedad 1: HOla holaaa /label If you click on the text Novedad 1: HOla holaaa the browser will behave as if you clicked on the checkbox itself. -Dan just as a

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread spinnach
you could try something like this: $('#content a').click(function (event){ if (!$(event.target).is('input:checkbox')) { //do something.. } }); p.s. i'm not sure if it's valid to have a checkbox inside a link ? dennis. Rob Desbois wrote: I'm not sure how to do this as it stands -

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread Rob Desbois
I'm not sure how to do this as it stands - I've never been particularly au fait with text nodes and how to work with them. However, a possible solution is to put the text next to the checkbox in a span and then attach the click event to that. --rob On 8/9/07, David Garcia Ortega [EMAIL

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread Klaus Hartl
Dan G. Switzer, II wrote: yes, sorry, it works if you include the for= bit.. if you leave it out (and write it like this, which is also 100% valid), clicking on the label won't work in ie6.. not sure about ie7.. in firefox it works: label Name input type=checkbox name=option id=option

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread Dan G. Switzer, II
David, I have a question about selectors. First of all, I have the following html: div id=content a href=# input type=checkbox name=option1 value=Novedad1 Novedad 1: HOla holaaa /a /div As you can see,

[jQuery] Re: Excluding an element part of a selection

2007-08-10 Thread Dan G. Switzer, II
Denis, label for=idOption1 input type=checkbox name=option1 id=idOption1 value=Novedad1 / Novedad 1: HOla holaaa /label If you click on the text Novedad 1: HOla holaaa the browser will behave as if you clicked on the checkbox itself. -Dan just as a side-note, this does not work in