From: "Paul Wilkins" <[EMAIL PROTECTED]>

If I have some time I'll get a fully tested version of this fleshed out.

// beware, untested code, dragons may be lurking
ahah = {
 init : function() {
   var els = document.getElementsByTagName('a');
   Array.forEach(els, function(el) {
     if ('ahah' == el.getAttribute('rel')) {
       var href = el.getAttribute('href');
       var id = 'ahah-' + el.getAttribute('id');
addEvent(el, 'click', 'function(){ahah.get("'+href+'", "'+'ahah-'+id+'")');
     }
   });
 },
 get : function(url, target, delay) {
  // code as per normal
 }
};

How close would something like this get to cleaning things up?

_______________________________________________
microformats-discuss mailing list
microformats-discuss@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to