O'Reilly logo

Building UIs with Wijmo by Yuguang Zhang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ComboBox

The Wijmo ComboBox works on the select and option elements. The options can either be loaded through HTML markup or JavaScript Object Notation (JSON). For our example, we load the menu items by using markup:

<!DOCTYPE HTML> <html> <head> ... <script id="scriptInit" type="text/javascript"> $(document).ready(function () { $("#states").wijcombobox({ dropdownHeight: 150, dropdownWidth: 200, showingAnimation: { effect: "clip" }, hidingAnimation: { effect: "fade" } }); $("#states").bind("wijcomboboxselectedindexchanged", function(e, data) { $('#message').text('You moved from ' + data.oldItem.label + ' to ' + data.selectedItem.label + '.'); } ) }); </script> </head> <body> <p><label id="output">Where do you live? (type to autocomplete)</label></p> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required