Ah, that makes sense. Thanks.

On Jan 31, 4:04 pm, Danny <[EMAIL PROTECTED]> wrote:
> Depends on what you're trying to do. In your case, the index and the
> value are identical, but next time they may not be:
> $.each( ['a','b','c'], function (index, val){
>   // index is 0...1...2, val is 'a'...'b'...'c'
>
> });
>
> On Jan 31, 3:40 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > $.each( [0,1,2,3,4], function(index, num) {
> >     $("#port"+num).click(function() { bigchart(num); });
>
> > });
>
> > Wait. What's the "index" in there for. I don't need that, do I? Seems
> > to work fine without it. I'll assume that was a leftover from a
> > previous idea.

Reply via email to