The wijcombobox consumes an input or select html element.
Input element
The following markup and jQuery script is an example of how to create the wijcombobox widget with an HTML input element.
Markup
Sample Markup |
Copy Code
|
<input id="combobox" /> |
The following script initializes the ComboBox widget and adds data.
Script
Sample Script |
Copy Code
|
<script id="script1" type="text/javascript">
$(document).ready(function () {
$("#combobox").wijcombobox({
data: [{
label: 'c++',
value: 'c++'
}, {
label: 'java',
value: 'java'
}, {
label: 'php',
value: 'php'
}, {
label: 'coldfusion',
value: 'coldfusion'
}]
});
});
</script>
|
Select element
The following markup and jQuery script is an example of how to create the wijcombobox widget with an HTML select element.
Markup
Sample Markup |
Copy Code
|
<select id="combobox">
<option value="c++">c++</option>
<option value="java">java</option>
<option value="php">php</option>
<option value="coldfusion">coldfusion</option>
</select>
|
The following script initializes the ComboBox widget.
Script
Sample Script |
Copy Code
|
<script type="text/javascript">
$(document).ready(function () {
$("#combobox").wijcombobox({
});
</script>
|
The result of either of these results in the following:
See Also
Reference