Home › Forums › JavaScript › AJAX page transition effect › Reply To: AJAX page transition effect
May 2, 2014 at 12:57 am
#169021
Chromawoods
Participant
Something like this? (might be a bit sloppy, but hopefully you get the idea)..
http://codepen.io/chromawoods/pen/nywfc
The trick here is to use a callback function for jQuery’s fadeOut
function, which fires after the animation is done. So basically, first fadeOut the content. Then, fetch the new content and fadeIn. You could also add a loading animation between the first content has faded out and the new content begins to fade in.