[jQuery] Re: Expanding the clickable region of a checkbox

2008-05-16 Thread Wizzud
No, you can lose the 'cb = ', it was left over from my testing ... sorry. On May 16, 2:55 pm, Andiih <[EMAIL PROTECTED]> wrote: > Thanks guys. That's (give or take an '=' sign) perfect :-) > > I presme I can acutally lose the 'cb = ' or is there a reason for > needing that assignment ? > > Andre

[jQuery] Re: Expanding the clickable region of a checkbox

2008-05-16 Thread Andiih
Thanks guys. That's (give or take an '=' sign) perfect :-) I presme I can acutally lose the 'cb = ' or is there a reason for needing that assignment ? Andrew On May 16, 12:10 am, Wizzud <[EMAIL PROTECTED]> wrote: > Eg. > >   $('td').bind('click', function(e){ >       if(e.target===this){ >  

[jQuery] Re: Expanding the clickable region of a checkbox

2008-05-15 Thread Wizzud
Eg. $('td').bind('click', function(e){ if(e.target===this){ cb = $(this).children(':checkbox').trigger('click'); return false; } }); On May 15, 4:16 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > The click callback gets the event object as the first parame

[jQuery] Re: Expanding the clickable region of a checkbox

2008-05-15 Thread Richard D. Worth
The click callback gets the event object as the first parameter. Check the event.target property. That will be the DOMElement actually clicked on. In your case, simply make sure it's a TD (ignoring the click on the checkbox, as that one's handled by the browser default). - Richard On Thu, May 15,