i want to create a little drop down div on my hompage. when a button is clicked it show the drop down when clicked it goes

I want to create a button that when clicked will show will show a little drop down menu on the side like this one here: http://postimg.org/image/re433fr2l/ this the code that i already have:

HTML

<body background="http://s14.postimg.org/rpo7dneox/NEWW.png/>
    <div class="div3">
         <UL>
       <LI><a href="color.html">HOME</a></LI>
       <LI><a href="layout.html">ARTICLES</a></LI>
       <LI><a href="myform.html">CONTACT </a></LI>
         <UL>
    <div>

CSS: ul{ font-family: impact; font-size: 90px; list-style: none; }

.div3{
    float:right;
    width:300px;
    height:300px;
    border:0px solid cyan;
    margin-top: 50px;
    margin-left: 570px;
}

a { 
    color:green;
}

a:hover{
    color:orange; 
    font-size: 100px;
}

Answers


You are looking for something like this: http://jsfiddle.net/Ltbodn0j/

$(document).ready(function () {
    $(".menu-toggle > button").click(function() {
        $(".menu-toggle > ul").toggle();
    });
});

Which translates to: if a user clicks the button -> toggle (show/hide) the list.

However, this is a very basic question so I advise you to follow an introductory tutorial on JavaScript and jQuery rather than simply copy-pasting my answer.


Need Your Help

Javascript on localhost doesn't work

javascript html localhost

i don't know what is the problem with localhost on Mac Pro , when i want to get a javascript code from a file to html page , it doesn't respond though the javascript work 100%(i checked it by putti...

k2 component not working in joomla 1.7.3

joomla joomla1.7 joomla-k2

Cannot create or save in k2 v2.5 in.5 joomla 1.7.3?