graham73may
9/14/2015 - 3:05 PM

jQuery Each to For

jQuery Each to For

        for (i = 0; i < $hideMes.length; i++) {
                $this = $($hideMes[i]);

                topOfObject = $this.offset().top + 75;
                bottomOfWindow = $(window).scrollTop() + $(window).height();

                /* If the object is completely visible in the window, fade it it */
                if (bottomOfWindow > topOfObject && $this.is(':visible') && parseInt($this.css('opacity')) === 0) {
                    $this.animate({'opacity': '1'}, 500);
                }
        }