Styling a dropdown to be consistent across all browsers is notoriously difficult. Wijmo offers two options for styling the HTML select
and option
elements. When there are no option groups, the ComboBox
is the better widget to use. This is covered in the next section. For a dropdown with nested options under option groups, only the wijdropdown
widget will work. As an example, consider a country selector categorized by continent:
<!DOCTYPE HTML> <html> <head> ... <script id="scriptInit" type="text/javascript"> $(document).ready(function () { $('select[name=country]').wijdropdown(); $('#reset').button().click(function(){ $('select[name=country]').wijdropdown('destroy') }); $('#refresh').button().click(function(){ $('select[name=country]').wijdropdown('refresh') }) }); </script> </head> <body> <button id="reset"> Reset </button> <button id="refresh"> Refresh...