<!-- jQuery code to show the working of this method -->
		$(document).ready(function() { 
			$("button").click(function() { 
				$("p").fadeTo(2000, 0.2, function() { 
					alert("افکت ()fadeTo به پایان رسید"); 
		body { 
			width: 40%; 
			height: 100px; 
			border: 2px solid green; 
			padding: 20px; 

	<!-- this paragraph will fade out -->

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



External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.