Closed jivanrij closed 12 years ago
This can be a problem if the node_id parameter is a string and the node ids are integers.
You can fix this by using parseInt:
var node = $('tree1').getNodeById(parseInt('30'));
Anyway, I do agree that using '==' would be better in this case. I can't change that at this moment because jqTree is written in CofeeScript, and CoffeeScript does not allow '==' (see http://coffeescript.org/#operators).
Oke, sounds logic, i'll do that.
Changed in the dev branch: the getNodeById comparison is now less strict. It uses the javascript '=='.
thanks, i'm using 1.3.1 now, works fine :)
I think i found a bug, ik wanted to use loadData, it didn't work because the node i got back from getNodeById was null. After a bit of searching i saw that the node_id & node.id in the getNodeById function are beeing compared with ===, instead of ==.
jqTree is awesome btw, i love it :)