[jQuery] Eventhandler registrieren

// https://www.w3schools.com/jquery/jquery_events.asp

// Beispiel ($(document).ready)
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
// mehrere Eventhandler für ein Objekt registrieren
$(document).ready(function(){
    $("#p1").on({
    	mouseenter : function(){
            $(this).html("Entered");
    	},
    	mouseleave : function(){
            $(this).html("Left");
    	}
		})
});
</script>
</head>
<body>
<p id="p1">Enter this paragraph.</p>
</body>
</html>