harvesthq/chosen — pull request #499 by K-Phoen (2012-02-16 12:00:13+00:00)
Title: Feature change event extra parameters

Hi,

For one of the projects I work on, I needed to know when an item was (de)selected in a select form field. To achieve this, I took advantage of the fact that chosen already knows when this happens to join additional data to the event which is triggered.

In practice, when the "change" event is triggered because of a new selected item, an additional parameter is joined to the event, holding the selected item's value. I also did the same for deselected items.