jquery animate动画实例
1、停止动画
 
 
animate实例:
2、点击按钮后div元素的几个不同属性一同变化
 
3、让指定元素左右移动
 
4、在600毫秒内切换段落的高度和透明度
 
5、用500毫秒将段落移到left为50的地方并且完全清晰显示出来(透明度为1)
 
6、切换显示隐藏
 
$(".box h3").toggle(function(){
    $(this).next(".text").animate({height: 'toggle', opacity: 'toggle'}, "slow");
        $(this).addClass("arrow");
        return false;
 
    },function(){
        $(this).next(".text").animate({height: 'toggle', opacity: 'toggle'}, "slow");
        $(this).removeClass("arrow");
        return false;
    });
});
//滚动焦点
$(window).scroll(function () {              //当前窗口的滚动事件
var winTop = $(window).scrollTop();     //获取当前窗口的大小
var objTop = $("#obj1").offset().top;   //获取当前对象的x坐标
});