Click event not fired for EasyUI Tree

When using tree module from easyUI framework, click will not fired using below method:

Html code

<li><span class="tester">TESTER01</span></li>
<li><span class="tester">TESTER02</span></li>
<li><span class="tester">TESTER03</span></li>

  Wrong method:

$('.tester').click(function(){alert('click fired')});

  It can be achieved by below method

$(document).ready(function() {
    $('#tester_tree').tree({
	onClick: function(node){
              alert('click fired!');
        }
    });
});

  

posted @ 2015-05-15 10:31  rongbin  阅读(161)  评论(0编辑  收藏  举报