EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jkdoyle on July 27, 2016, 07:43:43 PM



Title: Referring to jqueryEasyUI elements with jQuery
Post by: jkdoyle on July 27, 2016, 07:43:43 PM
This is a simple question with a simple solution, but I'm just missing it.

How do I reference easyUI components with jquery? For example, if I have a combogrid added to an input with id "#myInput", how do I do something like the following:

$('#myInput').combogrid.show();

?

Thanks
JD


Title: Re: Referring to jqueryEasyUI elements with jQuery
Post by: jarry on July 28, 2016, 03:59:58 AM
The $('#myInput') is the reference to the combogrid object. You can wrap the combogrid with a <span> element and then access it.
Code:
<id="mySpan" span>
  <input id="myInput" class="easyui-combogrid" ...>
</span>

To show or hide the combogrid, call this code:
Code:
$('#mySpan').show();
// $('#mySpan').hide();