JSFiddle - React, Tailwind, and code Playground
HTML
<h1>isDefaultPrevented test</h1>
<p>Mouse over the following area and view the log</p>
<div id="demo">
<a href="/"><img class="x" src="http://static.flowplayer.org/tools/img/photos/1.jpg"
title="A must have tool for designing better layouts and more intuitive user-interfaces."/></a>
<div id="log"></div>
</div>
CSS
h1
{
font-size: 2em;
font-weight: bold;
}
.x
{
width: 100px;
height: 50px;
background: #f00;
margin: 1em;
}
JavaScript
$('.x').bind(
'mouseenter',
function(e)
{
e.type = 'onBeforeShow';
$(this).trigger(e, ['something']);
$('#log').append('<p>e.isDefaultPrevented() = ' + e.isDefaultPrevented() + ', e.originalEvent.defaultPrevented = ' + e.originalEvent.defaultPrevented + '</p>');
}
);