[Wolves] javascript and dom question
Steve Parkes
sparkes at westmids.biz
Tue May 17 18:38:35 BST 2005
Steve Parkes wrote:
> replying to my own message so often has got to be a sign of mental illness
Now this really has got to be a sign of madness but here is my
solution. I couldn't see the wood for the trees for a while.
pat = document.createElementNS(XHTMLNS,"p");
pat.className = "titletext";
var sp = nicetitle.split(/\n/g);
for (var i=0; i < sp.length; i++) {
tnt = document.createTextNode(sp[i]);
tnb = document.createElement('br');
pat.appendChild(tnt);
pat.appendChild(tnb);
}
which makes no sense without the context of
http://www.kryogenix.org/code/browser/nicetitle/ for those wondering
what Aq's nice title script is and why he authored a book on the subject.
sparkes
More information about the Wolves
mailing list