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

103
Visualizações
Jquery click event is not working, when click from laptop mouse tracking pad else working fine

I have a page, where I search some ids in typing input using the typeahead library of jquery. When I clicked on the search result which renders in list from the external mouse, it triggered the click event and worked fine. But when I click on the same list from the laptop mouse tracking pad, nothing happened and don't trigger the click event function.

You can check in the video first two ids are searched and clicked by external mouse and added successfully, next one is search and click by laptop mouse tracking pad but nothing happened

Code snippet attached which is running behind this clicked

  $('.typeahead').on('click', function () {
        var item = $('#station_no_typeahead').val();
        $("#station_no_typeahead").val(null);
        if(selectedStationsArr.length < 10){
            //check if this item already exist in the list
            if($.inArray(item, selectedStationsArr) == -1) {
                selectedStationsArr.push(item);
                renderFromArray();
                console.log('Render Done');
            } else {
                console.log('Already in the list');
            }

        } else {
            console.log('Limit Reached');
            ShowErrorAlertCustomB5('Maximum selection of station is 
            reached.');
        }
    });
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

$(document).on('click', '.typeahead', function(){
    // code
});

If it's not worked update your input driver

about 4 years ago · Juan Pablo Isaza Relatório
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