wesnolte / jOrgChart

A jQuery plugin to draw tree-like structures such as OrgCharts.
992 stars 674 forks source link

New node div get the same id of original elements #19

Closed lahvey closed 12 years ago

lahvey commented 12 years ago

var new_node_id = $node.attr("id"); if (typeof new_node_id !== 'undefined' && new_node_id !== false) { $nodeDiv = $("

").addClass("node").attr("id", $node.attr("id")).append($nodeContent); }else{ $nodeDiv = $("
").addClass("node").append($nodeContent); }

It's invalid if two element have the same ids.

wesnolte commented 12 years ago

This is sorted now, id values are copied to the nodes in the .data() hash instead of using id-attribute.