js/jquery.treegrid.js
function() {
            return $(this).each(function() {
                var $this = $(this);
                var expander = $this.treegrid('getSetting', 'getExpander').apply(this);
                if (expander) {

                    if (!$this.treegrid('isCollapsed')) {
                        expander.removeClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
                        expander.addClass($this.treegrid('getSetting', 'expanderExpandedClass'));
                    } else {
                        expander.removeClass($this.treegrid('getSetting', 'expanderExpandedClass'));
                        expander.addClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
                    }
                } else {
                    $this.treegrid('initExpander');
                    $this.treegrid('renderExpander');
                }
            });
        }
function() {
            return $(this).each(function() {
                var $this = $(this);
                var expander = $this.treegrid('getSetting', 'getExpander').apply(this);
                if (expander) {

                    if (!$this.treegrid('isCollapsed')) {
                        expander.removeClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
                        expander.addClass($this.treegrid('getSetting', 'expanderExpandedClass'));
                    } else {
                        expander.removeClass($this.treegrid('getSetting', 'expanderExpandedClass'));
                        expander.addClass($this.treegrid('getSetting', 'expanderCollapsedClass'));
                    }
                } else {
                    $this.treegrid('initExpander');
                    $this.treegrid('renderExpander');
                }
            });
        }
function ( ) { return $ ( this ) . each ( function ( ) { var $this = $ ( this ) ; var expander = $this . treegrid ( 'getSetting' , 'getExpander' ) . apply ( this ) ; if ( expander ) { if ( ! $this . treegrid ( 'isCollapsed' ) ) { expander . removeClass ( $this . treegrid ( 'getSetting' , 'expanderCollapsedClass' ) ) ; expander . addClass ( $this . treegrid ( 'getSetting' , 'expanderExpandedClass' ) ) ; } else { expander . removeClass ( $this . treegrid ( 'getSetting' , 'expanderExpandedClass' ) ) ; expander . addClass ( $this . treegrid ( 'getSetting' , 'expanderCollapsedClass' ) ) ; } } else { $this . treegrid ( 'initExpander' ) ; $this . treegrid ( 'renderExpander' ) ; } } ) ; }
Rendering expander depends on node state

@returns {Node}
Rendering expander depends on node state