app/scripts/interaction.js
// UPDATE TOGGLE BUTTON GROUP FOR ACTIVE SELECTION
UPDATE TOGGLE BUTTON GROUP FOR ACTIVE SELECTION
UPDATE TOGGLE BUTTON GROUP FOR ACTIVE SELECTION
function updateToggleStatus(e) {
  let toggleButtons = document.querySelectorAll('.toggle');
  for (var i=0; i<toggleButtons.length; i++) {
    toggleButtons[i].classList.remove('selected');
  }
  e.target.classList.add( "selected" );
}
function updateToggleStatus ( e ) { let toggleButtons = document . querySelectorAll ( '.toggle' ) ; for ( var i = 0 ; i < toggleButtons . length ; i ++ ) { toggleButtons [ i ] . classList . remove ( 'selected' ) ; } e . target . classList . add ( "selected" ) ; }
UPDATE TOGGLE BUTTON GROUP FOR ACTIVE SELECTION
UPDATE TOGGLE BUTTON GROUP FOR ACTIVE SELECTION
// REMOVE SELECTED CLASS FROM ALL TOGGLES // ADD SELECTED CLASS TO SELECTED