harvesthq/chosen — pull request #2058 by SamJBarney (2014-08-26 20:27:59+00:00)
Title: Custom Container Tags for Inter-plugin Compatability

Using the plugins Chosen and NestedSortable together produces a
collision and breaks NestedSortable. This collision is because of the
rendered tags of Chosen hooked by NestedSortable. Given the choice
between patching jQuery UI and Chosen, Chosen was patched to use a set
of customizable tags. The following options are now available:

- outer_container -- default value = 'ul'

- inner_container -- default value = 'li'

The stylesheet has no references to the HTML tags (e.g. li.search-
choice is now .search-choice) including the stand-alone tags through
clever use of wildcards. The styling will apply to all tags used.
This is naturally dangerous, as a set of inappropriate tags could be
forced. However, the ability to change 'ul' and 'li' to 'div' and
'span' respectively, thus resolving the conflict between libraries
without affecting either's functionality far outweighs the fact that
an individual can break his or her markup.