scottgonzalez/jquery-ui-extensions — pull request #19 by irontoby (2013-06-24 21:39:10+00:00)
Title: add 'format' event

If the 'format' event is present, it is expected to set item.text to the actual text which should be rendered. Whether it is rendered as text or html will still depend on the 'html' option.

This is useful when you want to apply per-item formatting to the displayed results. In my case I wanted a different icon for various "types" of data which could be returned from the remote data source. Because the event has access to the data item, it can also access extra data which might be set (in addition to the "label" and "value" attributes).