Why do we write the action to be performed by a function in jQuery inside the parentheses?
- by ikartik90
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?