How do you do this? like PHP has call_user_func
I’m trying to pass a callback function to jQuery.animate(), like this
...
complete: function(){
// do_something
call_function(my_callback); // here need to call my_callback
}
...
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can simply call it like you would any function
JavaScript also has a call method that some people prefer
Here’s a link I found with some extra information regarding the call method. https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/Call