I have a function:
function foo() { console.log('i run!'); }
And a binding to a button:
$(function() {
$('#myButton').click(foo);
});
I am almost positive that the console should not show 'i run!' until the button is clicked. I have no other #myButton
s on the page (I have forple checked this), and yet foo
continues to run when another unrelated button is clicked. There are no other references to foo (again, forple checked).
What could be happening here? Am I binding wrong?