I want to slide in a div from left and move the current to the right, just like in iOS where you go back and forward.
I tried this but doesn’t seem work:
jQuery(".post .order").click(function() {
jQuery(this).parents(".post-front")
.hide("slide", { direction: "right" }, 1000);
.next(".post-back")
.show("slide", { direction: "left" }, 1000);
});
markup:
<div class="post">
<div class="post-front">
<a href="#" class="next"></a>
...
</div>
<div class="post-back">
<a href="#" class="back"></a>
...
</div>
</div>
Here is a Live Demo. Is this something you are trying to achieve? Please comment.