EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 31, 2016, 08:45:53 PM



Title: determine easyui-type from DOM object
Post by: devnull on March 31, 2016, 08:45:53 PM
Is there a reliable way of finding the easui object type from the DOM object ?

Code:
console.log($('#some_id').euiType());
>> textbox


Title: Re: determine easyui-type from DOM object
Post by: korenanzo on April 01, 2016, 08:11:19 AM
I resolved this writing it down when I create the object:

//create
 $('#some_id').textbox({...})
$('#some_id').data('myType','textbox')


//using
console.log($('#some_id').data('myType'))

HTH,
RIc