Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
182
rated 0 times [  187] [ 5]  / answers: 1 / hits: 91908  / 14 Years ago, sun, september 26, 2010, 12:00:00

I see that in different plugins and codes, but I don't understand what does that function... In the jQuery api isn't referenced!


More From » jquery

 Answers
15

apply calls 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:



somefunction.apply(thisObj, [argsArray])


The above calls the function somefunction, setting this to thisObj within the function's scope, and passing in the arguments from argsArray as the arguments to the function.


[#95497] Thursday, September 23, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kenyonc

Total Points: 235
Total Questions: 106
Total Answers: 125

Location: Bangladesh
Member since Sat, Jan 23, 2021
3 Years ago
;