I see that in different plugins and codes, but I don’t understand what does that function… In the jQuery api isn’t referenced!
Share
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.
applycalls a function with a set of arguments. It’s not part of jQuery, it’s part of core Javascript. However, there is mention of it in the jQuery docs:http://docs.jquery.com/Types#Context.2C_Call_and_Apply
Syntax:
The above calls the function
somefunction, settingthistothisObjwithin the function’s scope, and passing in the arguments fromargsArrayas the arguments to the function.