I am using the flexselect jQuery plugin to simplify selection on large <select>
lists, which employs the Quicksilver algorithm to flex-match (fuzzy match?) options.
For example: An input of 3gscam
quickly matches iPhone 3GS Camera
, but an input of cam3gs
does not.
Is there a modified version of the Quicksilver algorithm that works in both directions, with a preference for forward-matches?
An existing jQuery plugin would be helpful so I don't have to roll my own.
we can see the direction is set by the for loop from length to 0 if we dont find any option we can run the same code the other way from 0 to length
i hope i did it right