We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6028527 + cd4cfc2 commit 86267adCopy full SHA for 86267ad
src/js/jquery.orgchart.js
@@ -344,9 +344,9 @@
344
'name': $li.contents().eq(0).text().trim(),
345
'relationship': ($li.parent().parent().is('li') ? '1': '0') + ($li.siblings('li').length ? 1: 0) + ($li.children('ul').length ? 1 : 0)
346
};
347
- if ($li.attr('data-id')) {
348
- subObj.id = $li.attr('data-id');
349
- }
+ $.each($li.data(), function(key, value) {
+ subObj[key] = value;
+ });
350
$li.children('ul').children().each(function() {
351
if (!subObj.children) { subObj.children = []; }
352
subObj.children.push(that.buildJsonDS($(this)));
0 commit comments