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

  • SEARCH
  • Home
  • 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 7439739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:44:57+00:00 2026-05-29T10:44:57+00:00

I need a jQuery plugin for searching a large select box with 10 to

  • 0

I need a jQuery plugin for searching a large select box with 10 to 1000 options in it. http://harvesthq.github.com/chosen/ appeared to be viable at first, but I need to alter its functionality or an alternative plugin.

I have a series of select boxes, ranged from 10 to 1000 options. I need a way to provide a filter of the select box when the user types in a string that matches what option they are looking for. I found http://harvesthq.github.com/chosen/ which looks great, is functional, and easy to implement with my current html.

My only problem is that the search matches only on the start of words, and not in the middle of words. See the first example on the Chosen webpage, “Alba” matches “Albania” but “bania” does not match “Albania”. I need a solution where “bania” will match “Albania”, since in my select list most of the options are differentiated by a number at the end. Does anyone have experience with altering Chosen to have this functionality, or is there a different jQuery plugin that provides this functionality while also looking good, functional, and easy to implement? I’ve searched and found other plugins but they either don’t have a nice style or they seem more difficult to implement.

  • 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-05-29T10:44:57+00:00Added an answer on May 29, 2026 at 10:44 am

    Wow, this is the first I’ve heard of Chosen and it’s pretty awesome!

    Basically I found this line (chosen.jquery.js line 732):

    regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
    

    And just removed the ‘^’ as follows:

    regex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
    

    Doing this, I found that in the demo, “bania” will now find Albania.

    Of course, this is 15 minutes of looking… a few other things you may want to think about:

    • should this be optional? (maybe give the user a checkbox)
    • maybe winnow_results should be completely re-written to suit, for example with the above change the line starting with

      } else if (option.html.indexOf(” “) >= 0

      is now redundant

    ‘hope this helps

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

Sidebar

Related Questions

I use edit-in-place plugin: http://arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html I't works Great! I just need something to check
I need a jQuery plugin for skinning the form select tag. Currently I'm using
I am developing a model box jQuery plugin, and I need to know how
the jquery plugin that im using is this http://code.google.com/p/jquery-in-place-editor/ if i have a table
I'm using the jScrollPane jQuery plugin (http://jscrollpane.kelvinluck.com) to implement custom scrollbar in my application.
I found this jquery plugin which does exactly what I need, but I want
I need to raise a couple of events with parameters within a jquery plugin,
I'm looking for a jquery plugin to simulate a vertical marquee. I need it
I use a jquery validation plugin and I need to add some extra checking,
I am currently using PHP/MySQL and the jQuery timeago plugin. Basically, I need to

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.