So in JavaScript I can do the following:
var someObj = document.getElementById("foo");
var fooClick = foo.onclick;
var someOtherObj = document.getElementById("bar");
someOtherObj.onclick = fooClick;
I’m wondering, what is the jQuery equivalent to the code above?
Thanks!
or if you want this in one line: