harvesthq/chosen — pull request #2028 by StehlikC (2014-08-01 14:41:53+00:00)
Title: Support for Fuzzy Searching Strings

The chosen library has been great to work with so far. While working on a project I came across a use case where I needed a more flexible search on the options in a select box.

This change set addresses that issue by implementing a sort of fuzzy search across the options.

I'm no expert in CoffeeScript, so feel free to pull the code apart or suggest modifications.

##### Example

With the select box of:

```html

American Black Bear

Asiatic Black Bear

Brown Bear

Giant Panda

Sloth Bear

Sun Bear

Polar Bear

Spectacled Bear

```

Searching `Sp Bear` or `Bear Sp` will show `Spectacled Bear`