JSFiddle - React, Tailwind, and code Playground
by Couto
HTML
<div class="example">
div
<a href="#">link</a>
</div>
<input type="text" class="input"/>
<div class="status"></div>
JavaScript
var $status = $('.status'),
$input = $('.input'),
clicked = function (evt) {
console.log(evt);
$status.text(evt.type);
},
mouseenter = function (evt) {
$status.text(evt.type);
},
mouseleave = function (evt) {
$status.text(evt.type);
};
$('.example').on({
'click' : clicked,
'mouseenter a': mouseenter,
'mouseleave a': mouseleave
});
$('body').on({
'change input' : clicked,
'focus input': mouseenter,
'blur input': mouseleave
});