src/js/disclosure/disclosure-view.js
function(isVisible) {
                    var self = this,
                        $textEl = self.$el.find(self.options.toggleTextSelector);

                    if (isVisible) {
                        $textEl.text(self.$el.data('expanded-text'));
                    } else {
                        $textEl.text(self.$el.data('collapsed-text'));
                    }
                    $textEl.attr('aria-expanded', isVisible);
                    self.$el.toggleClass(self.options.isCollapsedClass, !isVisible);
                }
function(isVisible) {
                    var self = this,
                        $textEl = self.$el.find(self.options.toggleTextSelector);

                    if (isVisible) {
                        $textEl.text(self.$el.data('expanded-text'));
                    } else {
                        $textEl.text(self.$el.data('collapsed-text'));
                    }
                    $textEl.attr('aria-expanded', isVisible);
                    self.$el.toggleClass(self.options.isCollapsedClass, !isVisible);
                }
function ( isVisible ) { var self = this , $textEl = self . $el . find ( self . options . toggleTextSelector ) ; if ( isVisible ) { $textEl . text ( self . $el . data ( 'expanded-text' ) ) ; } else { $textEl . text ( self . $el . data ( 'collapsed-text' ) ) ; } $textEl . attr ( 'aria-expanded' , isVisible ) ; self . $el . toggleClass ( self . options . isCollapsedClass , ! isVisible ) ; }
Toggles the visibility of the section.

@param {boolean} isVisible True if the section should be visible (default: false).
Toggles the visibility of the section .