EasyUI Forum
December 20, 2025, 02:08:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: get the combo panel target ID  (Read 8084 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« 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)

Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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'))
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!