I have:
$('div').on('mouseenter', function(e) {
// ... things to do
});
However, this is not working. I tried ‘hover’ and ‘mouseenter mouseleave’ all together but they are not working either, unless I go with delegate or live.
Since now it’s “on” that shall be used, how can I get on and hover (or mouseenter) work?
Thank you.
Since you said it works if you use
delegateorlive, are you sure that the<div />you are testing this on is on the page when your jQuery event is wired up? Are you doing that jQuery call in the document ready event? i.e.$(function() { /* wire up event here */ });