<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/js/ie10-viewport-bug-workaround.js"></script>
<script src="/js/toastr/toastr.min.js"></script>
<script src="/js/TweenMax.min.js"></script>
<script src="/js/scrollToPlugin.min.js"></script>

<script>
    $(function () {


        window.onscroll=function () {
            //获取滚动条到顶部的距离
            var t = document.documentElement.scrollTop || document.body.scrollTop;
            //判断滚动条高度，设置事件
            if (t > 500 ) {
                $("#showTop").css({"display":"block"});
            }else{
                $("#showTop").css({"display":"none"});
            }
        };



        $("#gotop1").click(function (e) {
            TweenMax.to(window, 1.5, {scrollTo: 0, ease: Expo.easeInOut});
            var huojian = new TimelineLite();
            huojian.to("#gotop1", 1, {rotationY: 720, scale: 0.6, y: "+=40", ease: Power4.easeOut})
                .to("#gotop1", 1, {y: -1000, opacity: 0, ease: Power4.easeOut}, 0.6)
                .to("#gotop1", 1, {
                    y: 0,
                    rotationY: 0,
                    opacity: 1,
                    scale: 1,
                    ease: Expo.easeOut,
                    clearProps: "all"
                }, "1.4");
        });
    });
</script>