function b(){ h = $(window).height(); t = $(document).scrollTop(); if(t > h){ $('#gotop').show(); }else{ $('#gotop').hide(); } } $(document).ready(function(e) { b(); $('#gotop').click(function(){ $(document).scrollTop(0); }); $('#code').hover(function(){ $(this).attr('id','code_hover'); $('#code_img').show(); $('#code_img').addClass('a-fadeinL'); },function(){ $(this).attr('id','code'); $('#code_img').hide(); }) }); $(window).scroll(function(e){ b(); }); "/>

jQuery+css3网站右侧微信扫码关注返回顶部代码

126
0
jQuery右侧二维码jQuery返回顶部代码jQuery右侧飘浮代码
基于jQuery+css3实现的网站右侧微信扫码关注返回顶部代码,jQuery右侧飘浮二维码特效,jQuery返回顶部按钮代码。
<script type="text/javascript">
    function b(){
        h = $(window).height();
        t = $(document).scrollTop();
        if(t > h){
            $('#gotop').show();
        }else{
            $('#gotop').hide();
        }
    }
    $(document).ready(function(e) {

        b();

        $('#gotop').click(function(){
            $(document).scrollTop(0);
        });

        $('#code').hover(function(){
            $(this).attr('id','code_hover');
            $('#code_img').show();
            $('#code_img').addClass('a-fadeinL');
        },function(){
            $(this).attr('id','code');
            $('#code_img').hide();
        })

    });

    $(window).scroll(function(e){
        b();
    });
</script>