EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on August 11, 2014, 06:43:19 PM



Title: How to expand tree node by clicking its name (not by little arrow on the left)
Post by: aswzen on August 11, 2014, 06:43:19 PM
Yes how to expand a tree parent node by clicking its name (not by little arrow on the left)?

I want my parent node its not expand by clicking the little arrow on the left because its not too visible..

Thanks in advance
Thanks stworthy

Look picture attached to make sure where are the little arrow.  :'(


Title: Re: How to expand tree node by clicking its name (not by little arrow on the left)
Post by: aswzen on August 12, 2014, 03:19:54 AM
someone...


Title: Re: How to expand tree node by clicking its name (not by little arrow on the left)
Post by: stworthy on August 12, 2014, 05:48:10 AM
When clicking a tree node, the 'onClick' event fires, in which you can call 'expand','collapse' or 'toggle' methods to do actions on this clicked node. Please try the code below:
Code:
$('#tt').tree({
data:data,
onClick:function(node){
$(this).tree('toggle', node.target);
}
})