export default function toggleClass(elementTrigger, targetElement, targetClass) {

  if(elementTrigger){
    elementTrigger.addEventListener("change", function(){
      if(elementTrigger.checked){
        targetElement.classList.remove(targetClass);
      }else{
        targetElement.classList.add(targetClass);
      }
    });
  }

}
