Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

jQuery mouseover() method with example

The mouseover() method is an inbuilt method in jQuery which works when mouse pointer is over the selected HTML element.

Syntax:

$(selector).mouseover(function)

Example:

<!DOCTYPE html>  
<html>  
<head>  
<style>
div{
width:100%;
height:80px;
color:white;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>  
<script>  
$(document).ready(function(){  
	$("div").mouseover(function(){  
		$("div").css("background-color", "green");  
	});  
	$("div").mouseout(function(){  
		$("div").css("background-color", "orange");  
	  });  
});  
</script>  
</head>  
<body>  
<div><h3>Move your cursor over this paragraph.</h3></div>  
</body>  
</html>  
Run it Yourself »