$('a.filter').click(function(){ $(this).parent().addClass('active'); }); Dave Maharaj :: WidePixels.com wrote: How would I go about adding class to the li in this set up? <li><a href="" class="filter"><span>all</span></a></li> <li><a href="" class="filter"><span>some</span></a></li> <li><a href="" class="filter"><span>none</span></a></li>$('a.filter').click(function(){ $(???).addClass('active'); }); Thanks Dave |
- [jQuery] Selector Help Dave Maharaj :: WidePixels.com
- Re: [jQuery] Selector Help Charlie
- Re: [jQuery] Selector Help Mauricio (Maujor) Samy Silva
- Re: [jQuery] Selector Help Michel Belleville
- Re: [jQuery] Selector Help Michael Geary
- RE: [jQuery] Selector... Rick Faircloth