move toggle.toggled to be fired after classes are applied