I am using jQuery wookmark and also using ajax scroll load more pagination the problem is that when I use simple layut and test my scripts its all work perfect when I use this with jQuery wookmark then scroll system not work fine its repeat data some time.
These are my scripts:
$(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();
}
});
});
and this is 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>
}
and this is second 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>
}