判断滚动位置

function animateContent() {
        var $object = $("a,b,c");
       $object.each(function () {
        var $this = $(this);
        if ($this.length) {
            var $a = $(this).offset().top;
            var $b = $(window).scrollTop();
            var $c = $(window).height() * 0.75;
            var $d = $(window).height();
            var $selfHeight = $(this).height();
            if (($b > ($a - $c)) || ($b > ($a - $d + $selfHeight))) {
                $this.addClass("animate");
            }
        }
    });
    }