Interface JSTreeStatic

Index

Properties

Methods

Properties

public defaults: JSTreeStaticDefaults

holds all the default options used when creating new instances

property

defaults

type

{JSTreeStaticDefaults}

public idregex: any

public path: string

public plugins: Array<any>

stores all loaded jstree plugins (used internally)

public version: string

specifies the jstree version in use

property

version

type

{string}

Methods

public core(id: number)

the jstree class constructor, used only internally

Parameters

  • id: number

    this instance's index

public create(el: any, options?: JSTreeStaticDefaults): JSTree

creates a jstree instance

Parameters

  • el: any

    the element to create the instance on, can be jQuery extended or a selector

  • options?: JSTreeStaticDefaults optional

    options for this instance (extends $.jstree.defaults)

Returns

JSTree

the new instance

public reference(selector: string): JSTree

get a reference to an existing instance

Examples

$.jstree.reference('tree'); $.jstree.reference('#tree'); $.jstree.reference('branch'); $.jstree.reference('#branch');

Parameters

  • selector: string

Returns

JSTree

the instance or null if not found

public reference(element: HTMLElement): JSTree

get a reference to an existing instance

Examples

$.jstree.reference(document.getElementByID('tree')); $.jstree.reference(document.getElementByID('branch'));

Parameters

  • element: HTMLElement

Returns

JSTree

the instance or null if not found

public reference(object: JQuery): JSTree

get a reference to an existing instance

Examples

$.jstree.reference($('#tree')); $.jstree.reference($('#branch'));

Parameters

Returns

JSTree

the instance or null if not found