[jQuery] Re: Apply effect to entire div holding a link

2007-07-09 Thread Sam Collett
On Jul 9, 4:14 am, Larry Garfield <[EMAIL PROTECTED]> wrote: > You can attach a click event handler to the link, then crawl up the DOM to the > nearest div and .hide() that. > > I think something like this (untested!): > > $('a).bind('click', function () { > $(this).parents('div')[0].hide(); > >

[jQuery] Re: Apply effect to entire div holding a link

2007-07-08 Thread Larry Garfield
You can attach a click event handler to the link, then crawl up the DOM to the nearest div and .hide() that. I think something like this (untested!): $('a).bind('click', function () { $(this).parents('div')[0].hide(); }); On Sunday 08 July 2007, gabeg wrote: > Apply effect to entire div hold