hoverIntent
HTML
<script src="http://cherne.net/brian/resources/jquery.hoverIntent.minified.js"></script>
<div id="testing"></div>
Green by default, red on hover intent...
CSS
#testing { width: 100px; height: 100px; background: green; }
JavaScript
$('#testing').hoverIntent(function(e) {
change_color( $(this) , 'red' );
}, function(e) {
change_color( $(this) , 'green' );
});
function change_color( elem, color ) {
$(elem).css('background-color', color);
}
//$('#testing').trigger('hover');
//$('#testing').trigger('mouseover');
//$('#testing').trigger('mouseenter');
//$('#testing').hoverIntent();