I'd like to have a sliding transition between different pages of a website.
But unfortunately my knowledge of javascript is more than limited...

Basically what I want the script to do is:

  1. when the user clicks a link, create a new div (e.g. #next-page) at left:100% and load the target there.
  2. when the load is complete, animate the current page (e.g. #cur-page) to left:-100% and #next-page to left:0
  3. when the animation is complete, remove #cur-page and rename #next-page to #cur-page.

Would be awesome if somebody could help me out!

Thank you in advance!