Skip to content

Instantly share code, notes, and snippets.

@illycz
Created October 18, 2014 15:50
Show Gist options
  • Save illycz/0da5f8053a041ffeb825 to your computer and use it in GitHub Desktop.
Save illycz/0da5f8053a041ffeb825 to your computer and use it in GitHub Desktop.
Animace načítání referencí
http://www.studionaam.com/
$elements = $('.image');
$elements.each(function(i, e) {
$(window).scrollTop() + $(window).height() > $(this).offset().top + 100 ? $(this).addClass("inview") : $(this).removeClass("inview");
});
$(window).scroll(function () {
$elements = $('.image');
$elements.each(function(i, e) {
$(window).scrollTop() + $(window).height() > $(this).offset().top + 100 ? $(this).addClass("inview") : $(this).removeClass("inview");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment