Triggering a toggled event when toggling elements