Tuesday, 6 January 2015

Show/Hide Toggle() method

<!DOCTYPE html>
<head>
<title>jQuery Testing</title>
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
   <script type="text/javascript" language="javascript">
 
   $(document).ready(function() {
     $(".hidetext").click(function () {
     $(".text").toggle("slow")
  });
 
  });
   </script>

</head>

<body>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 970_90_demo_pages -->
<ins class="adsbygoogle"
     style="display:inline-block;width:970px;height:90px"
     data-ad-client="ca-pub-8001700278666760"
     data-ad-slot="2155301164"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />   <button class="hidetext">Toggle yellow line</button>
   <div class="text" style="background-color:yellow;display: none;">
     This is Yellow line!!
   </div>
</body>
</html>

0 comments:

Post a Comment