Código Javascript:
Ver original
function recoger(){ var qv = new Array(5); if(qv[0]=null){ for(i=0; i<5; i++){ for(j=0; j<5; j++){ for(z=0; z<5; z++){ localStorage.setItem("qv[i]", "{{video.nombre}}"); localStorage.setItem("qv[j]", "{{video.foto}}"); localStorage.setItem("qv[z]", "{{video.link}}"); } } } } else if(qv[1]=null){ for(i=0; i<5; i++){ for(j=0; j<5; j++){ for(z=0; z<5; z++){ localStorage.setItem("qv[i]", "{{video.nombre}}"); localStorage.setItem("qv[j]", "{{video.foto}}"); localStorage.setItem("qv[z]", "{{video.link}}"); } } } } else if(qv[2]=null){ for(i=0; i<5; i++){ for(j=0; j<5; j++){ for(z=0; z<5; z++){ localStorage.setItem("qv[i]", "{{video.nombre}}"); localStorage.setItem("qv[j]", "{{video.foto}}"); localStorage.setItem("qv[z]", "{{video.link}}"); } } } } else if(qv[3]=null){ for(i=0; i<5; i++){ for(j=0; j<5; j++){ for(z=0; z<5; z++){ localStorage.setItem("qv[i]", "{{video.nombre}}"); localStorage.setItem("qv[j]", "{{video.foto}}"); localStorage.setItem("qv[z]", "{{video.link}}"); } } } } else if(qv[4]=null){ for(i=0; i<5; i++){ for(j=0; j<5; j++){ for(z=0; z<5; z++){ localStorage.setItem("qv[i]", "{{video.nombre}}"); localStorage.setItem("qv[j]", "{{video.foto}}"); localStorage.setItem("qv[z]", "{{video.link}}"); } } } }else { alert("Ya completo"); } }
Gracias!!!