Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
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 answers
Answer question

0

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

If it's not worked update your input driver

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!