Added support for toggling parent elements.