mouseleave code example
Example 1: on mouse not over jquiery
$( "#other" ).click(function() {
$( "#outer" ).mouseleave();
});
Example 2: mouseout vs mouseleave js event
The mouseout event triggers when the mouse pointer leaves any
child elements as well the selected element.
The mouseleave event is only triggered when the mouse pointer
leaves the selected element.
Example 3: mouseleave to original image
function createHover (that) {
var original = document.getElementsByClassName("image_left");
that.addEventListener('mouseover', function() {
var src = that.getAttribute('data-src');
if (src) {
imageContainer.src = src;
}
});
that.addEventListener('mouseleave', function() {
});
}
initImageHover('li.one > a');
});