kartik-v / yii2-tree-manager

An advanced tree management module using nested sets for Yii 2.
http://demos.krajee.com/tree-manager
Other
150 stars 107 forks source link

Event onclick doesn`t work in last version. #158

Closed niksan8989 closed 7 years ago

niksan8989 commented 7 years ago

I want to add event onclick to form elements contained in Module::VIEW_PART_2. My code:

$('.edit-tabs a').click(function (e) {
    console.log('click');
 });

It works fine for default node that configured in setting "displayValue". But if I`m trying to select another node in the tree my event no longer works. I was trying to use this:

$("#pageTree").on('treeview.selected', function(event, key, data, textStatus, jqXHR) {
      $('.edit-tabs a').click(function (e) {
          console.log('click');
      });
 });

I used version 1.5 and this construction worked well. Now I am using the last version and It doesn`t work anymore. Could you please assist me what the problem is? Sorry for my English.