EXTJS How to swap the order of two childNodes?
I am a newbie in EXTJS. I am currently stuck on swapping the order of two tree nodes.
I tried to use
var temp = x.childNodes[index-1];
x.childNodes[index-1] = x.childNodes[index];
x.childNodes[index] = temp;
But on the tree panel, it shows that now the childNodes[index-1] is gone instead of swapping the order. I use fireBug to debug开发者_如何学运维, and it seems like these two childNodes have swapped the order under their parentNode. It is just not showing that on the tree panel.
What should I do? Refresh the tree panel or something?
Thanks,
have you tried this?
var temp = x.childNodes[index-1].cloneNode(true);
x.childNodes[index-1] = x.childNodes[index];
x.childNodes[index] = temp;
精彩评论