I want to move the Div-element "nav", when a li-element was clicked.
I have a List in a div
<div id="nav">
<ul>
<li><a href="#t1">Flyer</a></li>
<li><a href="#t2">Code</a></li>
<li><a href="#t3">Angebot</a></li>
<li><a href="#t4">Bilder</a></li>
</ul>
</div>
Why doesnt this work in jquery:
$("#nav ul li").click(function(){
$("#nav").animate({
marginLeft: "-300px",
}, 1000 );
});
<div id="nav">
? – Forestall$(docuement).ready(function(){/* your code */})
– Memoirs