$(".item21").click((function() {
var i = 0;
return function() {
$("#submenu").animate({
marginTop: (++i % 2) ? "+=330px" : "-=330px"
}, 400);
return false;
};
})());
Where and what can I add so that script will made #submenu fading in or fading out on every second click. I tried something with opacity:0 but I'm stuck. Thanks for help.