[jQuery] Re: Add click() event to each() loop constructor

2008-12-10 Thread Brett Alton
That was too easy. Thank you for the quick response! $(document).ready(function() { $("a[id*='activate-']").each(function(i){ $(this).click(function(){ $('#toggle1-'+i).slideToggle('slow'); $('#toggle2-'+i).slideToggle('slow'

[jQuery] Re: Add click() event to each() loop constructor

2008-12-10 Thread Brian Cherne
If I understand your question properly, it is possible. Try something like this: $(document).ready(function() { $("a").each(function(i){ $(this).click(function(){ alert(i); }); }); }); Brian. On Wed, Dec 10, 2008 at 10:29 AM, Brett Alton <[EMAIL PROTECTED]>wrote: > > Sorry, I'm new to Google Gr