Originally published at jeremyjarratt.com. You can comment here or there.
[EDIT: this site no longer supports the features described in this article. Sorry.]
You may have noticed in my sidebar that there are a few elements which are nested in an obvious hierarchical order. For example, at the time of this writing, i have a list of books which i am either reading, planning to read, or have already read, listed under the “now reading” heading.
You may also have noticed that the heading for each of these menu items is highlighted whenever you hover your cursor (pointer) over it.
What you may not have noticed is that the headings for these items’ parent elements is also highlighted when its descendant is hovered over. In other words, when you hover over the “planned books,” “current books,” or “recent books” list, the parent element, “now reading,” is highlighted as well.
(If you’re still not sure just what the hell i’m talking about, check out the demo first, and then come back.)
This is a cool trick that you rarely ever see on the internets, and it’s remarkably simple to do. You don’t need no fancy JavaScripting to do it, either! No server- or client-side scripts are used at all, just good old CSS, and a properly nested hierarchy of elements.
( Read the rest of this entry » )