Javascript Ajax jQuery Html PHP Example Quiz New MORE

jQuery mouseout() method with example

The mouseout() method is an inbuilt method in jQuery which works when the mouse pointer leaves the selected element.

Syntax:

$(selector).mouseout(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 »