Friday, January 2, 2009

[jQuery] How can I call a function if I have that function name stored in a string?

Something like this
var func = 'myFunc';

Can I call the function like this for example:

$.fn.myplugin.(func)();

(I'm using this in a plugin I'm working on)

Thank you very much

No comments: