js/jquery.treegrid.js
function() {
            var $this = $(this);
            if ($this.treegrid('getSetting', 'saveStateMethod') === 'cookie') {
                var stateArray = $.cookie($this.treegrid('getSetting', 'saveStateName')).split(',');
                if ($.inArray($this.treegrid('getNodeId'), stateArray) !== -1) {
                    $this.treegrid('expand');
                } else {
                    $this.treegrid('collapse');
                }

            }
            return $this;
        }
function() {
            var $this = $(this);
            if ($this.treegrid('getSetting', 'saveStateMethod') === 'cookie') {
                var stateArray = $.cookie($this.treegrid('getSetting', 'saveStateName')).split(',');
                if ($.inArray($this.treegrid('getNodeId'), stateArray) !== -1) {
                    $this.treegrid('expand');
                } else {
                    $this.treegrid('collapse');
                }

            }
            return $this;
        }
function ( ) { var $this = $ ( this ) ; if ( $this . treegrid ( 'getSetting' , 'saveStateMethod' ) === 'cookie' ) { var stateArray = $ . cookie ( $this . treegrid ( 'getSetting' , 'saveStateName' ) ) . split ( ',' ) ; if ( $ . inArray ( $this . treegrid ( 'getNodeId' ) , stateArray ) !== - 1 ) { $this . treegrid ( 'expand' ) ; } else { $this . treegrid ( 'collapse' ) ; } } return $this ; }
Restore state of current node.

@returns {Node}
Restore state of current node .