You can do this with JavaScript:
function bar(test) {
alert(test);
}
var foo = bar;
foo('hi');
I'd like to be able to do something similar with a jQuery event:
var foo = $('#bork').click;
foo(function() { alert('I was just clicked.'); });
However, I get an error when the page loads: this.bind is not a function
. Am I doing something wrong with the events here? Is there a better way to get the same effect?