The simplest way of doing that (but no Javascript)
A more reusable way, with Javascript (look at the source):
Another way, with Javascript (look at the source):