jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • eric
    Member

    How do add an element to the tree with an ‘id’ value?

    In your example you refer to id=’home’ …. but how do you add that to the tree?

    var elementByID = $(‘#jqxTree’).find(“#home”)[0];
    $(‘#jqxTree’).jqxTree(‘addTo’, { label: ‘Item’ }, elementByID);

    If I do:

    $(‘#jqxTree’).jqxTree(‘addTo’, { label: “Sports”, id: “sports” });

    and then try to find with:

    var elementByID = $(‘#jqxTree’).find(“#sports”)[0];

    it is not resolved.

    Please advise.

    Thanks.

Viewing 1 post (of 1 total)