My JavaScript currently looks like this:
$(document).ready(function () {
/* Every time the window is scrolled ... */
$(window).scroll(function () {
/* Check the location of each desired element */
$('.hideme').each(function (i) {
var bottom_of_object = $(this).offset().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
/* If the object is completely visible in the window, fade it it */
if (bottom_of_window > bottom_of_object) {
$(this).animate({ 'opacity': '1' }, 500);
}
});
});
});
And that works to fade an element in when i scroll to it. However, I'm trying to get the same effect that you can see on a lot of wrapbootstrap websites where the items also move into place. Does this take a long time? Would it be an easy fix to my code??
Here is an example of what i'm trying to get: http://wrapbootstrap.com/preview/WB0T75386
See how things move into place and fade in? Looks so nice.