-
-
Couldn't load subscription status.
- Fork 1.4k
Description
I am passing in additional attributes for a and li tag using data-jstree. But these attributes are not added to these elements.
Here is my sample HTML:
`
Administration
- `
Here is the rendered HTML
` <li
role="none"
data-jstree='{"selected": true
,"disabled": false
,"a_attr": {"title":"Tooltip for Node 1","class":"testttt"}
,"li_attr": {"title":"Tooltip for Node 1","class":"testttt"}
}'
id="Pages.Administration"
class="jstree-node jstree-open"
>
Administration
<li
role="none"
data-jstree='{"selected": true
,"disabled": false
,"a_attr": {"title":"Tooltip for Node 1","class":"testttt"}
,"li_attr": {"title":"Tooltip for Node 1","class":"testttt"}
}'
id="Pages.Administration.AuditLogs"
class="jstree-node jstree-leaf"
>
Audit logs
Code for initialization
`var _jsTreeOptions = {
types: {
default: {
icon: 'fa fa-folder text-warning',
},
file: {
icon: 'fa fa-file text-warning',
},
},
checkbox: {
keep_selected_style: false,
three_state: false,
cascade: '',
},
search: {
show_only_matches: true,
},
plugins: ['checkbox', 'types', 'search'],
};
if (options) {
if (options.singleSelect && options.singleSelect === true) {
$.extend(_jsTreeOptions, {
core: {
multiple: false,
},
});
}
}
$tree.jstree(_jsTreeOptions);`
I am not sure what exactly i am missing.
Thanks in advance