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

138
Visualizações
How to prevent ajax from confirming on success content already inside a div

How to prevent ajax from confirming on success content already in in this case in $('.Mydiv').Append(data);

$(document).ready(function (ajaxCall) {

    var offset = 0;
    var limit = offset + 4;
    var cats_in_home = '<?php echo $myCat ?>';
    var request_in_progress = false;

    $.ajax({
        type: 'GET',
        url: 'getActivity.php',
        data: {
            'offset': offset,
            'limit': limit,
            'cats_in_home': cats_in_home
        },

        success: function (data) {
            $('.get_communication_with_div_class').html(data);
        }
    });

    $('.MySeconddiv').onclick(function () {

        if (request_in_progress) {
            return;
        }

        request_in_progress = true;

        $.ajax({
            type: 'GET',
            url: 'getActivity.php',
            data: {
                'offset': offset += 6,
                'limit': limit,
                'cats_in_home': cats_in_home
            },

            success: function (data) {
                $('.Mydiv').append(data);
                request_in_progress = false;
            }
        });
    });
});


the problem is when i click the MySeconddiv tag its accept duplicates, plese help i cant find way to find a solution i cant find way to find a solution

over 4 years ago · Santiago Trujillo
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