<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("p").on({
mouseenter: function(){
$(this).css("background-color", "lightgray");
},
mouseleave: function(){
$(this).css("background-color", "lightblue");
},
click: function(){
$(this).css("background-color", "yellow");
}
});
});
</script>
</head>
<body>
<p>Click or move the mouse pointer over this paragraph.</p>
</body>
<!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_on_multiple by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:07:18 GMT -->
</html>