I have a function that indexes the combobox selection forwards and backwards, it does change the values however the combobox's onSelect() event does not appear to be triggering ?
$.extend($.fn.combobox.methods, {
index:function(me,dir){
function keyidx(arr,key,val){return arr.map(function(e){return e[key];}).indexOf(val)}
var d = {};
d.val = me.combobox('getValue');
d.data = me.combobox('getData');
d.idx = keyidx(d.data,'value',d.val);
if(dir==1 && d.idx < d.data.length -1) d.idx++; else if(d.idx > 0) d.idx --;
d.nval = d.data[d.idx++].value
me.combobox('unselect');
me.combobox('setValue',d.nval);
me.combobox('select',d.nval);
d = null;
}
})
What am I doing wrong ?