JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<p>
Hover the span, and see the MOUSEENTER trigger properly.
<br><br>
Manually trigger the MOUSEENTER via click on the link, and nothing happens.
<br><br>
Manually trigger a MOUSEOVER via click on the link, and MOUSEENTER happens.
<br><br>
</p>
<div>
<span>I'm a SPAN</span>
</div>
<a href='#' id='triggerME'>Click to manually trigger MOUSEENTER</a>
<a href='#' id='triggerMO'>Click to manually trigger MOUSEOVER</a>
CSS
span.hilite {
border: 2px dashed orange;
background: yellow;
}
p {
color: blue;
}
a {
display: block;
padding: 10px;
}
JavaScript
$('div').delegate('span', 'hover', function(e) {
$(this).toggleClass('hilite', e.type === 'mouseenter');
$('body').append('<br>SPAN received: ' + e.type);
});
$('#triggerME').click(function(e) {
$('span').trigger('mouseenter');
e.preventDefault();
});
$('#triggerMO').click(function(e) {
$('span').trigger('mouseover');
e.preventDefault();
});