Why do we write the action to be performed by a function in jQuery inside the parentheses?
Posted
by
ikartik90
on Programmers
See other posts from Programmers
or by ikartik90
Published on 2013-10-16T18:18:37Z
Indexed on
2013/10/21
4:09 UTC
Read the original article
Hit count: 208
Generally whenever we're programming in any Programming language, say C, we would pass the parameters we need to pass to a function using the parentheses next to the name of the function. Whereas in jQuery, other than the user defined function()
we write the action we need the function to perform inside the parentheses, for example,
$('div').mouseenter(function(){
/* blah blah blah*/
});
Why?
© Programmers or respective owner