One piece of javascript code that I use very frequently is a function that basically toggles the visibility of an element e.g. click, show, click, hide.