transition height on <p> tag when clicking anchor element - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

transition height on <p> tag when clicking anchor element

Demo Code

ResultView the demo in separate window

<!doctype html>
<html lang="en">
 <head> 
  <title>slideDown demo</title> 
  <style>

#lime/*from   www  . j ava 2  s . com*/
{
   background-color:#deff00;
   text-align:center;
}
.para {
   color:red;
}

      </style> 
  <script src="https://code.jquery.com/jquery-1.9.1.js"></script> 
 </head> 
 <body> 
  <div id="lime"> 
   <a href="#" id="click">hi</a> 
   <p id="red" class="para">How are you doing?</p> 
  </div> 
  <script>
$( "#click" ).click(function() {
$( "#red" ).slideToggle( "slow" );
});

      </script>  
 </body>
</html>

Related Tutorials