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

245
Vistas
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 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