Default Usage
Click on this paragraph to display next sibling.
This is the NEXT sibling!
HTML
<p class="toggle">Click on this paragraph to display next sibling.</p>
Show/hide previous sibling
- This is the PREVIOUS sibling!
- It can be any element...
- ...no restrictions there.
Click on this paragraph to display previous sibling.
HTML
<p class="toggle prev">Click on this paragraph to display previous sibling.</p>
Show/hide element based on ID
This feature works only on anchors (<a> elements). You can put the element wherever you want on the page.
Click here to show/hide the panel
<a href="#panel" class="toggle id">Click here to show/hide the panel</a>





