Advent.js
Thanks to a recommendation from Opus, I’ve been enjoying 24 Ways, which is kind of an advent calendar for web designers.
Many of the tips are things I’m tucking away for when I might need them in the future, but yesterday’s article gave me a snippet of code that I’ve already put to good use.
Some of you may have noticed that I’ve been keeping lists of books, music, and films that I’ve enjoyed. I couldn’t find a plug-in that did what I wanted with the lists, so I’ve been hand-coding them. That wasn’t a big deal at the beginning, but as the lists have grown, it’s become a bit of a chore to change the CSS on every item to maintain the alternating background style. It’s gotten so that I haven’t been updating them as often as I’d like (particularly the music list — I’m way behind on that).
Getting the background style to alternate isn’t something I should have to do manually, but I haven’t had the time or the PHP chops to figure out how to incorporate that into WordPress page content.
Enter 24 Ways. In yesterday’s entry, Patrick H. Lauke of splintered offered a concise javascript solution for this very problem. All it took was a few tweaks to the site, and my listing just got a whole lot easier.
And we’ve still got nine more days of goodies to go!
3 Ripples from “Advent.js”
opus says:
December 16, 2005 at 9:12 pm
Glad you found the site handy. I freaked out when I saw the technique for creating centered tabs. Alright, maybe “freaked out” is a bit much, but still, definitely one for the bookmarks.
zalm says:
December 16, 2005 at 10:13 pm
Yeah, that one was pretty nifty.
Today’s is a decent one, too, since I’ve spent much of the week cursing at IE. I need to get a little cleaner with my CSS hackery, or maybe even consider using more conditional comments. But for now, I’m just happy I got my rollovers to stop flickering.
patrick h. lauke says:
December 17, 2005 at 9:12 am
glad you found my little bit of javascript useful
-----