[jQuery] passing functions

[jQuery] passing functions


Hi,
Firstly - wow, what an amazing piece of work - Kudos!
I've been more productive with jQuery in a day than I've been with YUI, and
GWT in weeks.
Question:
how does one pass a function into jQuery, ie
given: function foo(){}
I want to assign it to the element's onclick handler:
$(elem).click (foo)
which doesn't seem to work?
(note, in this case, I don't want to define foo inside .click (), but just
pass it in)
thx
Dave
--
View this message in context: http://www.nabble.com/passing-functions-tf2805241.html#a7826647
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/