vendredi 30 janvier 2015

Toggle my menu when you click my nav button


Vote count:

0




Hello, what I am trying to achieve is: When I click on my class "menu" my with the class "nav" appears. and when its clicked again, it toggles so that its not visible. My html is this:



<div class="menu">
<div class="line"></div>
</div>
<ul class="nav">
<li><a href="#">Home</a></li>
<li><a href="#">Prices</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>


My javascript is this:



$('line').click(function(){
$('ul.nav').slideToggle();
})


I would appreciate anyones help, im a little stuck. Cheers



asked 40 secs ago







Toggle my menu when you click my nav button

Aucun commentaire:

Enregistrer un commentaire