Friday, April 18, 2008

Curse my Lack of Focus

Quite a while back, I took a couple of days to play with the Google Maps API. I knew things were getting dangerous when I discovered the ability to add custom overlays to the map and immediately started imagining all the cool stuff that could be done with that. With all the redesign work that still needs to be done, I just can't spare the time to essentially play with a new toy, no matter how work related that toy may be. I experimented just enough to produce a sort of proof of concept and then moved on to other things.

But now I'm kicking myself 'cos at least 3 other schools have explored just how much awesome can be distilled from these tools:

Oregon State is using the Jquery Google Maps plug-in, or at the very least they're using Jquery with Google Maps, with or without the plug-in. I'm interested in that 'cos I'm already using Jquery. The coolest thing I've found so far digging around in the source code is from Boston U. It doesn't seem to have anything to do with the map function specifically, but there's a function that sets all external links to open in a new window/tab and it's declared like this:

function l337() {
  if (document.getElementsByTagName) {
    var elements = document.getElementsByTagName('a');
    for (var i = 0; i < elements.length; i++) {
      if (elements[i].getAttribute('rel') == 'external') {
        elements[i].target = '_blank';
      }
    }
  }
}

How cool is a function called l337()? I don't even care what it does at that point.

And just so you know, FF3 has no problems rendering form elements within the baseline grid, so I can not worry about it and eventually that particular problem will take care of itself. Pixel perfection through apathy. Gotta love it.

Yesterday I got <sup> and <sub> tags working without screwing up the baseline grid too. It even seems to work cross browser. That's got just about everything I can think of except for images, and I know how that should work in pseudo code. Javascript has a MOD function, right? Right.

No comments: