What am I doing wrong here. The animation slide out the navigation, but can’t slide back in.
$(document).ready(function() {
$('.navLink').click(function(e){
var navCount=0;
if (navCount==0) {
$('.navigation').stop().animate({'marginLeft':'0px'}, 200);
$('#waitingPage').stop().animate({'marginLeft':'230px'}, 200);
var navCount=1;
}else if (navCount==1){
$('.navigation').stop().animate({'marginLeft':'-230px'}, 200);
$('#waitingPage').stop().animate({'marginLeft':'0px'}, 200);
var navCount=0;
};
});
});//END ready
seems to me that your code could be much simpler if you used .toggle()
something like this: