I've got...
$("#menu_tl").click(function() {
$('.page').fadeOut();
$('.page').animate({
"width": "0px",
"height": "0px",
"top": "50px",
"left": "50px"
});
$('#page1').fadeIn();
$('#page1').animate({
"width": "500px",
"height": "400px",
"top": "-350px",
"left": "-450px"
}, 2000);
});
$("#menu_tr").click(function() {
$('.page').fadeOut();
$('.page').animate({
"width": "0px",
"height": "0px",
"top": "50px",
"left": "50px"
});
$('#page2').fadeIn();
$('#page2').animate({
"width": "500px",
"height": "400px"
}, 2000);
});
But I want to say that when the second function is clicked all altered css by the first one should be reset. This means that the following line is wrong:
$('.page').animate({
"width": "0px",
"height": "0px",
"top": "50px",
"left": "50px"
});
is wrong and should be replaced by a global reset. Hope this is clear enough...