Answer: To attach mouse enter event to a html element, mouseenter() method can be used.
$("#spanMouseDownUp").mouseenter(function () {
$(this).html("Mouse entered in this area");
});
<div id="spanMouseDownUp" style="background:green;color:White;padding:10px;">Try to bring your mouse here</div>
code mouse enter shows when user try to enter into the area of “spanMouseDownUp” element then “Mouse entered in this area” will be written inside it.
Asked In: spotted while learning |
Alert Moderator