Posted By

vtoman on 11/15/11


Tagged

jsTree


Versions (?)

Custom icons for jsTree nodes


 / Published in: JavaScript
 

Where nodes have rel attribute, in this case custom icon is for rel="file".

  1. $("#treeViewContainer")
  2. .jstree({
  3. "core": {
  4. "animation": true,
  5. "initially_open": initiallyOpen
  6. },
  7. "html_data": {
  8. ...
  9. },
  10. "plugins": ["themes", "html_data", "ui", "types"],
  11. "ui": {
  12. "select_limit": 1
  13. },
  14. "types": {
  15. "types": {
  16. "file": {
  17. "icon": {
  18. "image": "../images/file.png"
  19. }
  20. }
  21. }
  22. }
  23. })
  24. .bind("select_node.jstree", function (event, data) {
  25.  
  26. });

Report this snippet  

You need to login to post a comment.