EasyUI Forum
June 17, 2024, 11:18:13 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: Referring to jqueryEasyUI elements with jQuery  (Read 3354 times)
jkdoyle
Newbie
*
Posts: 25


View Profile Email
« 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
Logged
jarry
Administrator
Hero Member
*****
Posts: 2265


View Profile Email
« Reply #1 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();
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!