change moved node children color

37 views
Skip to first unread message

Zoran Jeremic

unread,
Jul 24, 2010, 2:23:41 PM7/24/10
to jsTree
Hi,

I have two trees and I drag and drop the nodes from one to another.
For each dragged node I set a different color for nodes in both trees.
Here is the code I use for this:

$("#basic_html2").bind("move_node.jstree",
function (event,data){

data.rslt.o.children("a").css("color","grey");
data.rslt.oc.children("a").css("color","grey");

However, this doesn't affect the children nodes, so children are not
colored. Can you suggest me how to make all children to have the same
effect?

Zoran

ChrisR

unread,
Jul 24, 2010, 2:40:38 PM7/24/10
to jsTree
Hi,

Try:

data.rslt.o.find("a").css("color","grey");
data.rslt.oc.find("a").css("color","grey");

Best regards,
ChrisRaven

Zoran Jeremic

unread,
Jul 24, 2010, 2:46:46 PM7/24/10
to jsTree
Thanks Chris.

This works:)

Zoran

ChrisR

unread,
Jul 24, 2010, 2:50:00 PM7/24/10
to jsTree
You're welcome :)

Best regards,
ChrisRaven
Reply all
Reply to author
Forward
0 new messages