Select2 templateResult add class to first group li

166 views
Skip to first unread message

rj.a...@gmail.com

unread,
Mar 22, 2016, 11:49:25 AM3/22/16
to select2
In the screenshot provided, I'm attempting to add a background color to the first group (Alaskan/Hawaiian Time Zone) using the templateResult option.

I've noticed that the container parameter in:

templateResult: function(data, container) {
return data.text;
}

is returning the strong tag for the group instead of the li selected in the screenshot. I'd appreciate any assistance in a solution to this customization.

Screen Shot 2016-03-22 at 11.21.40 AM.png
Reply all
Reply to author
Forward
0 new messages