Achieving collapsible headers similar to those in jQuery Mobile is possible without using jQuery. Here are five examples that demonstrate how to do so:
HTML5's detail and summary tags offer a simple solution for this problem, eliminating the need for styling or scripting:
<summary>Collapse 1</summary><br> <p>Content 1...</p><br></details><br><details><br> <summary>Collapse 2</summary><br> <p>Content 2...</p><br></details>
The above is the detailed content of How Can I Show and Hide Divs with Clicks Using Only CSS and HTML?. For more information, please follow other related articles on the PHP Chinese website!