Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

91
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda