packages/cf-expandables/src/Expandable.js
function toggleTargetState( element ) {
  if ( element.classList.contains( this.classes.targetExpanded ) ) {
    this.ui.target.classList.add( this.classes.targetCollapsed );
    this.ui.target.classList.remove( this.classes.targetExpanded );
  } else {
    this.ui.target.classList.add( this.classes.targetExpanded );
    this.ui.target.classList.remove( this.classes.targetCollapsed );
  }
}
function toggleTargetState( element ) {
  if ( element.classList.contains( this.classes.targetExpanded ) ) {
    this.ui.target.classList.add( this.classes.targetCollapsed );
    this.ui.target.classList.remove( this.classes.targetExpanded );
  } else {
    this.ui.target.classList.add( this.classes.targetExpanded );
    this.ui.target.classList.remove( this.classes.targetCollapsed );
  }
}
function toggleTargetState ( element ) { if ( element . classList . contains ( this . classes . targetExpanded ) ) { this . ui . target . classList . add ( this . classes . targetCollapsed ) ; this . ui . target . classList . remove ( this . classes . targetExpanded ) ; } else { this . ui . target . classList . add ( this . classes . targetExpanded ) ; this . ui . target . classList . remove ( this . classes . targetCollapsed ) ; } }
Toggle an expandable to open or closed.
@param {HTMLNode} element - The expandable target HTML DOM element.
Toggle an expandable to open or closed .