This works perfectly for the .show class, but sometimes .caption animates very fast before .show. I've tried to set .caption into a callback function of .show to prevent .caption from animating early, like this: