add afterToggle callback