EasyUI Forum
May 10, 2024, 02:53:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Different CSS for Multiple Comboboxes?  (Read 4879 times)
2plus2
Jr. Member
**
Posts: 75


View Profile
« 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
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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')
}
})
Logged
2plus2
Jr. Member
**
Posts: 75


View Profile
« Reply #2 on: December 01, 2015, 04:04:20 PM »

Thanks. Much appreciated.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!