EasyUI Forum
May 17, 2024, 12:17:40 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: How to set the easyui-tree onDblClick expand and close the node?  (Read 5238 times)
frankgao
Jr. Member
**
Posts: 53


View Profile Email
« on: August 05, 2016, 02:47:52 AM »

I need set the onDblClick expand and close the node.
How to do it? 
Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 05, 2016, 05:49:59 PM »

Please try this code:
Code:
$('#tt').tree({
  onDblClick: function(node){
    if (node.state == 'closed'){
      $(this).tree('expand', node.target);
    } else {
      $(this).tree('collapse', node.target);
    }
  }
})
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!