Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

89
Vistas
increment loop based on iframe load

i need to get the increment loop based on max, so if the increment inside the iframe load is reach the max, the increment is back to 1 2 3 ... here's the code i've try

<script type="text/javascript">
var n = 1;    //based on page access ex:1
var max = 8;    //based on the array data ex:8
$('#iframe').on('load', function() {
    var i = n++;
    var l = ( (i-1) == max) ? 1 : i;
    var el = $('div[id^="detail_'+l+'"]')
    var k = el.attr('key')
});
</script>

the problem is when i've reach the max 8 and successfull back to 1, the next load is going to 10 not going to loop 1 to 8 again. it would be nice if you guys have a suggestion. thank

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda