EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on February 14, 2015, 09:01:26 PM



Title: get the combo panel target ID
Post by: devnull on February 14, 2015, 09:01:26 PM
How can I get the combobox drop-down panel target from the combobox() which in this case is "i201"

Code:
<div class="combobox-item" id="_easyui_combobox_i201_1">
  <span style="width:40%">F-0001</span>
  <span style="width:60%">A8000</span>
</div>

console.log($('#cbo').combobox().panel().id)



Title: Re: get the combo panel target ID
Post by: stworthy on February 15, 2015, 12:38:42 AM
Please try the code below to get the specify item element.
Code:
var value = '3';  // the item value
var cc = $('#cbo');
var opts = cc.combobox('options');
var el = opts.finder.getEl(cc[0], value);
console.log(el.attr('id'))