I have a bunch of events and I loop through them.  I would like to
create a double-click effect so that I call function
"eventDoubleClick" but I want that event to pass its index value, as
such:

for (i=0, i<arrayLength; i++)
{
    $t("#event_" + i).dblclick(function () {eventDoubleClick(i)});
}


Basically all the above does is then setup so that all the event
dblclicks are calling eventDoubleClick(i) which uses the last i value;
instead of setting them up as eventDoubleClick(1),
eventDoubleClick(2), .... eventDoubleClick(n)


I have tried putting " " around the i and event the entire function
call...  so any help would be great so I don't sit here all day
beating up my head (or just getting sick of it and browsing the
archives at http://www.userfriendly.org  :P  )


Thanks

~Terry

Reply via email to