Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A simple, standards-based way to implement this would be to use the HTML5 details and summary elements.

http://html5doctor.com/the-details-and-summary-elements/

You could make default the details to be "open" for big screens and closed, showing the summary only, for small ones. Downside is that you only get two levels if you stick to the spirit and letter of the standard.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: