EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: 2plus2 on November 30, 2015, 02:50:54 PM



Title: Different CSS for Multiple Comboboxes?
Post by: 2plus2 on November 30, 2015, 02:50:54 PM
We have three different combo boxes on a page and we want them to be styled differently. We have the primary select/text box formatted differently, but the panels used for the drop down options all inherit the same CSS. Is there a way to style each of the combo box's drop down options independently?

e.g.
combobox #1, white text blue background on drop downs
combobox #2, white text green background on drop downs
combobox #3, red text gray background on drop downs


Title: Re: Different CSS for Multiple Comboboxes?
Post by: jarry on November 30, 2015, 06:41:56 PM
Please try to add a class to the drop-down panel when open it.
Code:
$('#cc').combobox({
onShowPanel: function(){
$(this).combobox('panel').addClass('c1')
}
})


Title: Re: Different CSS for Multiple Comboboxes?
Post by: 2plus2 on December 01, 2015, 04:04:20 PM
Thanks. Much appreciated.