EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: JDMcQ on January 17, 2015, 10:09:53 AM



Title: Getting Events to work for tree
Post by: JDMcQ on January 17, 2015, 10:09:53 AM
I've just started using EasyUI and am working with the tree object. I can get the tree to render correctly several ways bu NEVER get a simple click event to do anything.

 
Code:
  
<head>
 <script type="text/javascript">
      $(function(){
         $('#cat').tree({
            lines:true,
            animate:true,
            onClick:function(node){
            alert("Test Worked.");
            }
         })
      })
   </script>

</head>

And the HTML part:

Code:
			<ul id="cat" class="easyui-tree" data-options="url:'CatFill.php'"></ul>			


There must be something really simple I'm missing please help.


Title: Re: Getting Events to work for tree
Post by: jarry on January 17, 2015, 07:22:19 PM
Please refer to this example http://jsfiddle.net/qw8Ljjtv/


Title: Re: Getting Events to work for tree
Post by: JDMcQ on January 22, 2015, 07:40:01 PM
I finally got it working I think I was missing a library. Sometimes when I add one for more functionality, everything that was working stops.  ??? >:(