I am trying to achieve a functionality where clicking a div will move another div to the right by 0, and on clicking the div again, the second div will move to the right by -200. However, I am facing issues getting it to work properly.
$(document).ready(function(){
$('#menu').click(function(){
if ($('#menudrop').css('right', '-200px'));
$('#menudrop').css('right', '0px');
else{
$('#menudrop').css('right', '-9999px');
};
});
});