Possible Duplicate:
check window open
I'm using JQuery to change the URL of a window.open event depending on certain selections:
$(".class").click(function() {
window.open("http://www.url.com/" + variable);
});
The problem is that every time it changes, I have to call this click function again and the old window.open event is still remembered and two windows are opened, then 3, then 4, etc.
I have tried a lot of work-arounds and nothing is working. I tried calling the click function just once and then changing the variable but the window.open will only remember the original variable.
Is there a way to remove old click event handlers before adding a new one?