0

I have a JSTree and I want to use custom icons for folder and files, but it's not picking up the file icon that I have set up. The code looks like this:

 $('#tree').jstree({
            'plugins': ['types'], // Enable the types plugin
            'types': {
                'default': {
                    'valid_children' : ['file'],
                    'icon': "./images/xp/folder.png",
                      // Specify the icon for default nodes (without files)

                }, // Default node type
                'file': { // Leaf node type
                    'valid_children' : [ 'none' ],
                    'icon': "./images/xp/file.png"
                    }  // Specify the icon for leaf nodes
            }
        })

When I view the site, I'm seeing this: Tree view the folders and files

The icons marked in Red are the end nodes and I want them to appear as file icons.

What am I doing wrong? Thanks

I tried renaming the 'default' to 'folder'm as somone suggested but it didn't like that either.

Leon
  • 1
  • 1

0 Answers0