What does the ‘function’ do in the following?
$('.event-row').on('mouseover',function(){
arc.event_handler.event_row_over();
});
$('.event-row').on('mouseover',arc.event_handler.event_row_over );
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.
There’s a very important difference.
The first one will call the function with
the contextitsthisvalue as theevent_handlerobject.The second one will call the function with
the contextitsthisvalue as the DOM element to which the handler is bound.So the first one preserves the expected
calling contextthisvalue, which may be required by the function.