Ti invio quello che ho fatto io con la parte da sistemare...
Codice PHP:
<script language="javascript">
var Stand = 0,Stand2 = 0,Response = 0,Response2 = 0,Counter = 0,Lung,i=0,j=0,z=0,Num = new Array();
function Prova(){
response = "1999995";
if(Response != response){
Stand = response.length;
if(Stand2 != Stand){
Stand2 = Stand;
$("#utenti").html("");
for(i=0;i<Stand;i++){
$("#utenti").append('<div id="Stand_'+i+'" class="Stand"></div>');
}}
Response = response;
}
if(response != Response2){
Prova2();
}}
function Prova2(){
Response2 = ((((Response%2) == "0") ? (Response/2) : ((Response-1)/2))+Counter);
if(Response > Response2){ Counter++; }else{ Counter--; }
Response3 = String(Response2),Lung = Response3.length,Cont = Response3.split("");
z = 0;
/*Parte da Sistemare*/
for(i=0;i<Lung;i++){
if(Num[i] != Cont[i]){
for(j=2;j>-1;j--){
$("#Stand_"+((Lung-1)-i)).html(Cont[i]+'_'+j);
}}}
for(i=0;i<Lung;i++){ Num[i] = Cont[i]; }
}
$(document).ready(function(){
Prova();
window.setInterval("Prova();",3000);
});
</script>