<html> 

<head> 
	<script
	src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"> 
	</script> 
	<!-- jQuery code to show the working of this method -->
	<script> 
		$(document).ready(function() { 
			$("button").click(function() { 
				$("p").fadeTo(2000, 0.2, function() { 
					alert("افکت ()fadeTo به پایان رسید"); 
				}); 
			}); 
		}); 
	</script> 
	<style> 
		body { 
			width: 40%; 
			height: 100px; 
			border: 2px solid green; 
			padding: 20px; 
		} 
	</style> 
</head> 

<body> 
	<!-- this paragraph will fade out -->
	<p>Farazgar.com</p> 

	<!-- click on this button and paragraph will fade out -->
	<button>کلیک کنید</button> 

</body> 

</html> 

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.