Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8934805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:51:55+00:00 2026-06-15T09:51:55+00:00

Is it possible with jQuery Auto-complete, to make it so that if there are

  • 0

Is it possible with jQuery Auto-complete, to make it so that if there are ‘source:’ values available, but they don’t match what you are typing, then just show all the sources at once?

IE, given the following code, if I type in “pineapple”, how do you show all the programming languages instead of none of them?

<script>
$(function() {
    var availableTags = [
        "JavaScript",
        "Perl",
        "PHP",
        "Python",
        "Ruby"
    ];
    $( "#tags" ).autocomplete({
        source: availableTags
    });
});
</script>
<input type="text" id="tags" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:51:57+00:00Added an answer on June 15, 2026 at 9:51 am

    Use the source property with a custom function. The custom function shown below mimics autocomplete original behavior, searching for the typed text as substring inside available tags. If no match is found, all available tags are returned.

    $(function() {
        var availableTags = [
            "JavaScript",
            "Perl",
            "PHP",
            "Python",
            "Ruby"
        ];
        $("#tags").autocomplete({
            source: function(request, response) {
                var term = request.term.toLowerCase();
                var matchingTags = $.grep(availableTags, function(tag) {
                    return tag.toLowerCase().indexOf(term) >= 0;
                });
                response(matchingTags.length ? matchingTags : availableTags);
            }
        });
    });​
    

    demo here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is It possible To Use ASP.NET TextBox With Jquery UI Auto CompletE? I am
Is it possible to select DISTINCT values using Rails3 JQuery autocomplete gem?
I want to make a few customizations to jQuery UI Autcomplete: 1) If there
I am using jQuery's autocomplete function to fetch possible input labeles/values from suggest_address.php .
Possible Duplicate: jquery autocomplete this.source is not a function error I have an autocomplete
I have a jQuery autocomplete that works in most browsers but only kind of
Ok, stupid question and I don't think it's possible but, I have this markup
I am developing a Auto complete functionaly for my project using JQuery plugin, i
I'm trying to achieve ajax-like-file-upload-using-hidden-iframe . Obviously there are many plugins available for that
I have a jQuery autocomplete entry that I want to make look more like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.