Hi timaios,
The ‘id’ that you set in the source object is set to the DOM element that represents the tree item.
For example:
– Create a tree.
var source = [ { id: 1, icon: "../../images/mailIcon.png", label: "Mail", expanded: true, items: [ { id: 2, icon: "../../images/calendarIcon.png", label: "Calendar" }, { id: 3, icon: "../../images/contactsIcon.png", label: "Contacts", selected: true } ] }, { icon: "../../images/folder.png", label: "Inbox", expanded: true, items: [ { icon: "../../images/folder.png", label: "Admin" }, { icon: "../../images/folder.png", label: "Corporate" }, { icon: "../../images/folder.png", label: "Finance" }, { icon: "../../images/folder.png", label: "Other" }, ] }, { icon: "../../images/recycle.png", label: "Deleted Items" }, { icon: "../../images/notesIcon.png", label: "Notes" }, { iconsize: 14, icon: "../../images/settings.png", label: "Settings" }, { icon: "../../images/favorites.png", label: "Favorites" }, ];// create jqxTree$('#jqxTree').jqxTree({ source: source, width: '250px', theme: ''});
– get the element with id = 1
var element = $('#jqxTree').find('#1');
Best Regards,
Peter Stoev
jQWidgets Team
http://www.jqwidgets.com