hover.html
678 Bytes
<!--https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hover<!DOCTYPE html>
$("img").hover(function(){
$("img").attr("width", "500");
},
function(){
$("img").attr("width", "284");
});
-->
<html>
<head>
<title>Home</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#p1").hover(function(){
alert("You entered p1!");
$("#p2").text("1234");
alert($("#p1").attr(value));
},
function(){
alert("Bye! You now leave p1!");
});
});
</script>
</head>
<body>
<p id="p1">This is a paragraph.</p>
<p id="p2"></p>
</body>
</html>