DS928
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
The CSS
The HTML
Not sure if this is the way or if there is a better way. Thank you.
The Javascript
<script>
$(function () {
$("#button").click(function () {
$("#lines").slideToggle()
})
})
</script>
The CSS
#lines {
position: fixed;
top: 20px;
right: 30px;
height: 5px;
width:30px;
border-bottom: 17px double white;
border-top: 6px solid white;
content:"";
}
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>
Not sure if this is the way or if there is a better way. Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...and set the position on the wrapper div, not the lines div
ASKER