Completes javascript to target idea with toggle functionality