After discovering an incredible answer on this specific question, I was able to customize the appearance of my <select>
element using jQuery Chosen. However, a problem arises when a user begins typing in the search bar and the formatting is lost.
You can see an example of this issue here, just above the form submit button.
Is there a way to prevent or fix this issue?
$('.populate-school .gfield_select').on('chosen:showing_dropdown keyup change', function()
{
$('.chosen-results .active-result, .chosen-single span').html(function()
{
var val = $(this).html().split(',');
return '<strong>'+val[0]+'</strong><br/>'+val[1];
});
});