I understand that referencing $('#Counter')
over and over is a bad idea because you are "jumping into the DOM each time".
But is this any better?
Counter = $('#Counter');
And then inside the loop:
Counter.val()++
Edit:
Correction to the snippet above, which should be:
Counter.val(Counter.val()+1);
Or is that doing the same thing?