|
Post by Schubaltz on Apr 18, 2007 18:50:51 GMT -5
This one runs just as quickly as the other. The only difference is that this one follows the W3C DOM standards.
Description: Splits the main-page categories into tables separated by set margins.
Source: Open
Cross-browser: Yes
Main Footer
<style type="text/css"> <!-- .split { width: 100%; margin-bottom: 24px } .split td { padding: 4px } --> </style> <script type="text/javascript"> <!-- // Split Categories
var split = [ ]; if(/com\/(\w+\.cgi)?\??(#.+|\w+=home)?$/i.test(location.href)) for(var l = document.links, k = 4; k < l.length; k ++) if(l[k].className == "nav") { var j = l[k].parentNode.getElementsByTagName("table"); for(var i = j[1].rows, x = 1; x < i.length; x ++) if(i[x].cells.length > 1 || i[x].cells[0].align == "right") split[split.length - 1].firstChild.appendChild(i[x].cloneNode(true)); else { var t = j[1].cloneNode(false); t.className = "split bordercolor"; t.appendChild(document.createElement("tbody")); t.firstChild.appendChild(i[0].cloneNode(true)); t.firstChild.appendChild(i[x].cloneNode(true)); split.push(t); } var con = document.createElement("div"); for(var x in split) con.appendChild(split[x]); j[0].style.backgroundColor = "transparent"; j[1].parentNode.replaceChild(con, j[1]); break; } //--> </script>
|
|