jQuery Plugin: Adding Callback functionality
Posted
by dclowd9901
on Stack Overflow
See other posts from Stack Overflow
or by dclowd9901
Published on 2010-03-28T20:33:38Z
Indexed on
2010/03/28
20:43 UTC
Read the original article
Hit count: 213
I'm trying to give my plugin callback functionality, and I'd like for it to operate in a somewhat traditional way:
myPlugin({options}, function() {
/* code to execute */
});
or
myPlugin({options}, anotherFunction());
How do I handle that parameter in the code? Is it treated as one full entity? I'm pretty sure I know where I'd place the executory code, but how do I get the code to execute? I can't seem to find a lot of literature on the topic, so thanks in advance for your help.
© Stack Overflow or respective owner