I am learning jQuery and have a very basic question. How does the following jQuery code match the API documentation for .on():
$('body').on('mouseenter', '#jResult', function(e) {
...
});
According to the jQuery API for .on(), .on() can take the following form:
.on( events [, selector ] [, data ], handler )
I gather that the event is 'mouseenter' and the handler is the function, right?
However "selector" and "data" appear to be optional, correct?
Is '#jResult' a selector or data???
After you tell me if it is a selector or data, kindly tell me how I could have figured this out by reading the documentation?
It is probably something obvious, but I have read and re-read the documentation and just don't get it.
Please help...