Hi guys... i have this problem... it works pretty well but when i am trying this in mozilla ... sometimes it load contect two times... and i dont know why... chrome,,, opera... everything is okay... but in mozilla is the contect doubled sometimes...
I tried to add the 'old new data' condition but it didnt help
Code:
jQuery(window).bind('scroll',function() {
var $win=$(window);
if ($win.height() + $win.scrollTop() == $(document).height()) {
var ID='';
ID=$("article:last").attr("id");
var ID=parseInt(ID);
$.ajax({
type: "POST",
url: "/modules/load_another_statuses.php",
data: {ID: ID },
async: false,
cache: false,
dataType: "json",
beforeSend: function() {
document.getElementById("loading").style.display = "block";
},
success: function(data) {
var NewData=data.idecko.length;
if (OldData!=NewData) {
$('article:last').after(data.idecko);
$('a[rel*=facebox]').facebox();
}
var OldData=data.idecko.length;
document.getElementById("loading").style.display = "none";
}
});
}
});