Effect on jQuery [closed]

3

How to make an effect in jQuery, that when using the SCROLL the divs and the elements appear in fadeIn, like in that site: link

    
asked by anonymous 29.01.2014 / 19:01

3 answers

4

Something like that? JsFiddle Example

$(window).scroll(function () {

        /* checar a localização dos elementos */
        $('.imagem').each(function (i) {

            var bottom_of_object = $(this).position().top + $(this).outerHeight();
            var bottom_of_window = $(window).scrollTop() + $(window).height();

            /* se o objeto estiver completamente "scrollado" */
            /* pra dentro da janela, fazer o fade in */
            if (bottom_of_window > bottom_of_object) {

                $(this).animate({
                    'opacity': '1'
                }, 500);

            }

        });

    });

Remember to set% w / o% of the objects you want to fade in to opacity .

    
29.01.2014 / 19:07
2

SuperScrollorama , a plugin for jQuery, has what you need. Also, I could count at least 14 other scroll effects in their demo: -)

    
29.01.2014 / 19:07
0

You can use the jQuery.appear plugin.

$('img[src]').appear(function(){
    $(this).show();
});
    
29.01.2014 / 19:17