/ Published in: jQuery
Simple Show/Hide Panel we learned in class for an assignment.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript" src="jquery.js"> </script> <script type="text/javascript"> /* <![CDATA[ */ // Jquery implementation of Show/Hide Panel for Instructions $(document).ready(function(){ $(".showhide").click(function(){ $(".panel").slideToggle("slow"); }); }); /*]]>*/ </script> <div class="c2"> <p class="showhide">Click to Show/Hide Instructions</p> <div class="panel"> <p>Jquery testing of .slideToggle</p> <div class="c1"> Testing Show/Hide Instructions </div> </div>