> I had to do something similar today, and I did something like > > function myfunction(f){ > $(element).click(function(){eval(f+"();");}); > } > that was off the cuff, but that should work.
That would be the ticket if f is a string containing the name of a function. But why not just pass a function reference around directly? Then you could simply do: function myfunction(f){ $(element).click(f); } -Mike _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/