Click to fade - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:fadeTo

Description

Click to fade

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> 
      <script type="text/javascript">
    $(function(){/*from w ww  .j  a  v a2 s. c om*/
 $(function(){
    $('a').click(function(){
        console.log("hi");
        $('#box').fadeOut();
    });
    });
    });

      </script> 
   </head> 
   <body> 
      <div id="box"></div> 
      <a href="#">Click Me !</a>  
   </body>
</html>

Related Tutorials