[uf-discuss] XOXO Comments

David Janes -- BlogMatrix davidjanes at blogmatrix.com
Wed Dec 28 13:14:58 PST 2005


Try MochiKit [1].

var xoxo_elements = getElementsByTagAndClassName("*", "xoxo")
for (var xi = 0; xi < xoxo_elements.length; xi++) {
    var children = getElementsByTagAndClassName("*")
    for (var ci = 0; ci < children.length; ci++) {
       element = children[ci]
       if ((element.tagName == "UL") || (element.tagName == "OL")) {
           // ... do stuff ...
       }
    }
}

Regards, etc...
David

[1] http://www.mochikit.com/doc/html/MochiKit/DOM.html

Paul Bryson wrote:
> "David Janes -- BlogMatrix" wrote...
>> What are you trying to do in Javascript? Certainly, you couldn't expect 
>> all XOXO's in the wild to look like this.
> 
> Not at all.  I want the JavaScript on MY page to be simple, I think I can 
> make it work easiest if every child of an XOXO on MY page has a 
> class="xoxo".  So I was wondering if this is allowed or not.
> 
> I was not suggesting that any other page on the internet do the same as what 
> I am trying to do.
> 
> 
> Atamido 
> 
> 
> 
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
> 
> 



More information about the microformats-discuss mailing list