Fade to a certain opacity : fadeTo « jQuery « JavaScript DHTML






Fade to a certain opacity

   

<html>
  <head>
    <style>
      .test{ border: 1px solid red; }
    </style>
  
    <script type="text/javascript" src="js/jquery-1.3.2.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>

   
    
    
  








Related examples in the same category

1.Fade to callback
2.Fast fade to
3.Fade to in milliseconds
4.Fade to random
5.Slow fade to
6.fadeTo(speed, opacity, callback): Only the opacity is adjusted for this animation