Link to home
Start Free TrialLog in
Avatar of DS928
DS928Flag for United States of America

asked on

Drop Down Menu

I have a 3 Line icon on a webpage that is to be a drop down menu.  It's wacky right now as I have a button but I need it to work of the CSS image.  How can I do this?

The Javascript
<script>
		$(function () {
    $("#button").click(function () {
        $("#lines").slideToggle()
    })
})
</script>

Open in new window


The CSS
#lines { 
   position: fixed;
   top: 20px;
   right: 30px;
  height: 5px;  
   width:30px;
border-bottom: 17px double white; 
    border-top: 6px solid white; 
    content:"";
   	}

Open in new window



The HTML
<input type="button" id="button" value="Click Me">
    <div id="lines">
    A Menu <br>
    A Menu <br>
    A Menu <br>
    A Menu <br>
    </div>

Open in new window


Not sure if this is the way or if there is a better way.  Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DS928

ASKER

Thank you Gary.
...and set the position on the wrapper div, not the lines div