I have the following code:
function someMethod() { $(obj).click(function {}); }
someMethod is called twice and thus click event is binded
You can achieve this with pure JS, using addEventListener method and his once option
target.addEventListener('click', handler, {once: true});