0

I am using Jquery JsTree from https://www.jstree.com/

I am stuck with an issue with drag and drop. When i drag a node I can see a green tick mark or a red cross mark following the cursor.

Now what I need to do is, I need to change the icon and the text which follows the cursor depending on whether a control button is pressed.

I have tried looking through forums but was unable to find a solution to this. Has any one come across this? Any idea how can i achieve this?

Bond
  • 55
  • 6

1 Answers1

1

This is not proper solution but you can update to newly created html element on check_callback callback jstree-dnd is plugin dynamic html element

"core":{ 
   "check_callback": function (callback, node, node_parent, node_position, more){
               $('.tree-dynamic-tooltip').remove();
                var span = $('<span>');
                span.addClass('tree-dynamic-tooltip');
                span.html('your dynamic text goes here');
                $('#jstree-dnd').find('i').after(span);
   } 

}

Kaushal
  • 666
  • 6
  • 15