Fade to by time
Description
The following code shows how to fade to a certain opacity.
Example
<html>
<head>
<style>
.test {<!--from w w w . ja v a2s. c om-->
border: 1px solid red;
}
</style>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("p:parent").fadeTo(1500, 0.3);
});
</script>
</head>
<body>
<div>
<p>paragraph in div</p>
</div>
<div>div</div>
</body>
</html>