Inspired by Meitar Moscovitz article “A Little-known Way to Replace Some Scripts with CSS Counters” over at SitePoint, I’ve added a little bit of CSS to make the hCard microformat pop out of the page, while counting all occurrences and adding it to the bottom of the page, no JavaScript involved.
Next I’d like to add interactivity to the hCard, so that when you click it, it shows up on the Mapanui pane, in stead of clicking on the link(s) at the bottom of the pane. Some next version…
Tags: css, microformats, sitepoint
Oh, cool! Do you have any benchmarks you use for testing Mapanui? It seems like this would be an interesting use case to compare this CSS counters technique against a pure JavaScript technique and see which one is faster, and so on. One of the benefits of the CSS technique is that there are no DOM manipulations, which can be a really sore bottleneck for JavaScript sometimes.
No, don’t have any benchmarks for now. I did notice it is a bit flaky, not working everywhere, but that might be me as I’m looking for geo or street-address. If it’s only location name, then it would appear to be 0, though it shows up on the map anyway.