Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php jQuery wookmark如何使用向下滚动加载更多内容?_Php_Jquery_Ajax_Wookmark - Fatal编程技术网

Php jQuery wookmark如何使用向下滚动加载更多内容?

Php jQuery wookmark如何使用向下滚动加载更多内容?,php,jquery,ajax,wookmark,Php,Jquery,Ajax,Wookmark,我使用jQuery wookmark,也使用ajax scroll加载更多分页问题是,当我使用简单的Layout并测试我的脚本时,它的所有工作都很完美。当我使用jQuery wookmark时,滚动系统在一段时间内无法正常工作,重复数据 以下是我的脚本: $(document).ready(function(){ function last_msg_funtion() { var IDall=$(".box-main:last"

我使用jQuery wookmark,也使用ajax scroll加载更多分页问题是,当我使用简单的Layout并测试我的脚本时,它的所有工作都很完美。当我使用jQuery wookmark时,滚动系统在一段时间内无法正常工作,重复数据

以下是我的脚本:

    $(document).ready(function(){   
        function last_msg_funtion()
        {
           var IDall=$(".box-main:last").attr("zid");
           var cbid=$(".box-main:last").attr("pid");
            $('div#last_msg_loaderi').html('<img src="bigLoader.gif">');
             $.get('page.php', {'action':'get','last_msg_id':IDall,'id':cbid}, 
            function(dataz){
                if (dataz != "") {
                $(".box-main:last").after(dataz);           
                }
                $('div#last_msg_loaderi').empty();
            });
        };  
        $(window).scroll(function(){
            if  ($(window).scrollTop() == $(document).height() - $(window).height()){
               last_msg_funtion();
            }
        }); 

});
这是1st load.php

        "select box.upload_type,
    box.id,
    box.box_type,
    box.page_name,
    box.title,
    box.connect,
    box.type,
    box.uid,
    box.description,
    box.image,
    box.url,
    box.status,
    box.date,
    box.time
        from boxes as box left join page_boxes as pbox on 
    box.id=pbox.bid
     where pbox.page_id='".$_GET['id']."'
     and box.status='".$approval."'
     order by box.id 
    desc limit 100"
while($my_boxi=mysql_fetch_array($myboxexi)){
$bid=$my_boxi['id'];
<div class="box-main" zid="<?php echo $bid; ?>" pid="<?php echo $_GET['id']; ?>">
</div>
}
这是第二个load.php

$last_msg_id=$_GET['last_msg_id'];
            "select box.upload_type,
        box.id,
        box.box_type,
        box.page_name,
        box.title,
        box.connect,
        box.type,
        box.uid,
        box.description,
        box.image,
        box.url,
        box.status,
        box.date,
        box.time
            from boxes as box left join page_boxes as pbox on 
        box.id=pbox.bid
         where pbox.page_id='".$_GET['id']."'
         and box.status='".$approval."' and box.id<'".$last_msg_id."'
         order by box.id 
        desc limit 100"
$last_msg_id='';
    while($my_boxi=mysql_fetch_array($myboxexi)){
    $bid=$my_boxi['id'];
    <div class="box-main" zid="<?php echo $bid; ?>" pid="<?php echo $_GET['id']; ?>">
    </div>
    }

这主要是因为你想发明你自己的HTML。根据w3关于div的官方文件,zid和pid是无效属性,那么我该怎么办?help:-/使用有效标识符。@RoyalBg你是说属性?没错:而且我认为从GET数组将属性传递给标记是不安全的