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

107
Views
How can I filter a jQuery Autocomplete?

I want to filter the following jQuery Autocomplete function so that the search/filtering should be done from the beginning of the word only.

here's the search code im working with

if ($('#search_placeholder_l').length > 0) {
    $('#search_placeholder_l')
        .autocomplete({
            source: '/test/get_xs?check_enable_ys=false',
            minLength: 3,
            response: function(event, ui) {
                if (ui.content.length == 1) {
                    ui.item = ui.content[0];
                    $(this)
                        .data('ui-autocomplete')
                        ._trigger('select', 'autocompleteselect', ui);
                    $(this).autocomplete('close');
                } else if (ui.content.length == 0) {
                    swal(LANG.no_products_found);
                }
            },
            select: function(event, ui) {
                $(this).val(null);
                get_l_placeholder_row(ui.item.pl_id, ui.item.vl_id);
            },
        })
        .autocomplete('instance')._renderItem = function(ul, item) {
        return $('<li>')
            .append('<div>' + item.text + '</div>')
            .appendTo(ul);
    };
}
about 4 years ago · Juan Pablo Isaza
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!