I have the following code:
function someMethod() { $(obj).click(function {}); }
someMethod is called twice and thus click event is binded
var bound = false; function someMethod() { if(!bound) { $(obj).click(function {}); bound = true; } }
but I would probably look into why it;s being called twice before making some kind of workaround.