Toggle: restrict details example to a parent element

This stops the details example from opening/closing all details elements on the page. 

Discussed in #4518.