I don't have any problems such as an error but it's too lagging on the page. Here is my js:
$(document).ready( function() {
photosdone();
});
function photosdone() {
setTimeout( function() {
photosupdates();
photosdone();
}, 800);
}
function photosupdates() {
$.getJSON("check_photos.php", { id: $("#id").val() },function(data) {
$("#photos").empty();
$.each(data.result, function(){
$("#photos").append("<li class='col-lg-3 col-md-3 '><img class='img-responsive' src='data:"+this['MIME']+";base64,"+this['img']+"' width=150px height=150px></li>");
});
});
}
and here is my page:
<ul id="photos" class="row bar">
</ul>
While the page doesn't have picture, it's running as well. But when I upload some pictures more than 2, I think my page is stuck although it occurs in several times.