0
Help me please
i have created a dropdn menu, when a user click a icon..here is ts jquery $("#icon").click(function(){ $("nav>ul").children().slideToggle(500); /* when a icon is clicked, the element below the drop down( i.e video), moves down, its margin-top changes from 5px to 50px as shown below*/ $("video").css("margin-top","50px"); }); the problem is when i click the icon again, to slide up the dropdown menu, the video element stays in the margin-top of 50px, i want it to go back to 5px...how ts done?
0 Answers