$(document).ready(function () { $("#myDiv").hover(function () { $(this).html("Mouse pointer entered the div. This text will disappear as you move out of the div."); }, function () { $(this).html('Hover ME !'); }); });
<html> <head> <title>HTML</title> </head> <body> <div id="myDiv">Hover ME ! </div> </body> </html>
#myDiv { background-color:gray; margin-left:100px; width:200px; height:200px; font-family:comic sans ms; }