[jQuery] Fighting a closure

2008-01-30 Thread timothytoe
I think I submitted a half-done version of this message by accident a few minutes ago. Sorry. This works: $("#port0").click(function() {bigchart(0)}); $("#port1").click(function() {bigchart(1)}); $("#port2").click(function() {bigchart(2)}); $("#port3").click(function() {bigchart(3)}); $

[jQuery] Fighting a closure

2008-01-30 Thread timothytoe
This code works... $("#port0").click(function() {bigchart(0)}); $("#port1").click(function() {bigchart(1)}); $("#port2").click(function() {bigchart(2)}); $("#port3").click(function() {bigchart(3)}); $("#port4").click(function() {bigchart(4)}); Naturally, I want to do this: var por