Skip to content
Justice Tech School

Mouse Events

mouseenter, mouseleave, mousemove and contextmenu.

Example
$("#a").on("mouseenter", function () {
  $(this).addClass("over");
}).on("mouseleave", function () {
  $(this).removeClass("over");
});

Exercise

Mouse enters.

.on("mouse", fn)

Quiz Test

Which event fires when the mouse enters?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.