item.classList.toggle('disabled', enabled); should be enough.