How to show hide div on clicking a link?

    You can do this by using jquery toggle function Here is the Html
    <a href="#" id="showmenu">Click Here</a>
    <div id="content_div" style="display:none;position:absolute;">
    <ul>
      <li>Link 1</li>
      <li>Link 2</li>
      <li>Link 3</li>
      <li>Link 4</li>
      <li>Link 5</li>
      <li>Link 6</li>
      <li>Link 7</li>
      <li>Link 8</li>
    </div>
    Here is the js code:
    <script language="javascript">
    $('#showmenu').click(function() {
      $('#content_div').toggle('slow');
    });
    </script>
    Note: Please include Jquery.js
    4
    Average: 4 (1 vote)

    User login