HTML to expand / collapse div sections
15 Nov 2014To use a A
link as a button we can href="#self"
, please note that href="#
makes browser
jump to top of page. And href="javascript:void(0)"
is too comebersome. Sources:
* Href attribute for JavaScript links: # or javascript:void(0)?
* how to prevent javascript div popup from jumping back to the top of the page?
To enable collapse / expand in Java Script, please use sample from How to hide, show, or toggle your div
Useful: * Markdown help * [Create element with markdown (kramdown)](http://stackoverflow.com/questions/13685874/create-span-element-with-markdown-kramdown)
In the end, i think using button to expand / collapse div
sections is more elegant approach.