I'm studying jQuery and I'm using slideToggle
and as the documentation says, it should slide to its current opposite position.
I do not quite understand this but it just slides down.
$(document).ready(function(){
$('li')
.hide();
});
$('#btn-menu').click(function(){
$('li')
.toggle()
.slideToggle();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><buttonid="btn-menu">MENU</button>
<ul id="menu">
<li>Menu1</li>
<li>Menu2</li>
<li>Menu3</li>
<li>Menu4</li>
</ul>