I wonder why this isn't working as expected:
$(function() {
$(".door1-trigger").click(function() {
$(".door").hide();
// $(".door1").show("slide", { direction: "right" }, 1000);
return false;
});
$(".door2-trigger").click(function() {
$(".door").hide();
$(".door2").show("slide", { direction: "left" }, 1000);
return false;
});
$(".main-trigger").click(function() {
$(".door").hide();
if ($('.door1:visible')) {
$(".main").show("slide", { direction: "left" }, 1000);
} else {
$(".main").show("slide", { direction: "right" }, 1000);
}
return false;
});
});
I would like only the main
shown initially, clicking on door 1
slides the appropriate container from left, and clicking door 2
slides the door2 container from right.
Many thanks for your help!