You can replace your Options with JS plugin:
HTML:
<h3>multiSelect = false</h3>
<div id="combo1" class="combo"></div><br>
<button id="get1">get1</button>
<button id="set1">set1</button>
JS:
$(function(){
var dd = [];
for(var i=1;i<=4; i++)
dd.push({ code: i + '', name: 'Employee ' + i });
var cfg = {
keyField: 'code',
displayField: 'name',
multiSelect: false,
width: 200,
boxWidth: 200,
cols : [{
field: 'code', width: '30%'
},{
field: 'name', width: '70%'
}],
data: dd
};
var cfg1 = $.extend({}, cfg);
var cb1 = $('#combo1').mac('combo', cfg1);
$('#get1').click(function(){
alert(cb1.selected);
});
$('#set1').click(function(){
cb1.select(2);
});
});
Don't forget to copy external sources from jsfiddle:
Here is a fiddle
http://jsfiddle.net/arslantabassum/p5s4jzez/
1. copy html
2. copy javascript
3. copy external sources