为了账号安全,请及时绑定邮箱和手机立即绑定

我的console.log(top) ,这两个高火狐,谷歌都打不出啦社呢原因呢?帮我看看咯

<script src="../js/jquery-2.1.0.js"></script>
    <script type="text/css">
        $(docment).ready(function(){
            $(window).scroll(function(){
                var top = $(document).scrollTop();
                var menu = $("#menu");
                var items = $("#content").find(".item");
                var currentId="";   //给楼层设置id
                
                items.each(function(){
                    var t= $(this);
                    var itemtop = t.offset().top;
                    if(top > itemtop){
                        currentId = "#"+ t.attr("id");  //给相印的楼层a设置current,取消其他相关的current
                    }else{
                        return false;
                    }
                });
                console.log(top);
            });
        });

正在回答

3 回答

 <script type="text/css">这不是这样的, <script type="text/javascript">

1 回复 有任何疑惑可以回复我~

哦好吧



0 回复 有任何疑惑可以回复我~

用最新版试试

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

我的console.log(top) ,这两个高火狐,谷歌都打不出啦社呢原因呢?帮我看看咯

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号