I came up with this select-box variant in answer to a question on UX.SE: http://ux.stackexchange.com/a/48951/16187
However, working out how to implement it has been driving me mad ever since I wrote that post.
What I've tried
Initially I figured it would be easy enough to do.
Where I'm Stuck
However I have no clear idea what that sort of architecture would look like, or how I should go about coding it.
Can you help me work out what a better high level implementation strategy for this sort of widget looks like?