How would this code be refactored to use jQuery?
- by C.W.Holeman II
How would this code be refactored to use jQuery?
var lu = function luf(aPrefix){
switch (aPrefix){
case 'xhtml':
return 'http://www.w3.org/1999/xhtml';
case 'math':
return 'http://www.w3.org/1998/Math/MathML';
case 'svg':
return 'http://www.w3.org/2000/svg';
case 'emleo':
return 'http://emle.sf.net/emle020000/emleo';
}
return '';
};
function emleProcessOnLoad(aThis) {
var result = document.evaluate("//xhtml:span[@class='emleOnLoad']",
aThis.document, lu, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var jj=0; jj<result.snapshotLength; jj++){
var emleOnLoad = result.snapshotItem(jj).textContent;
eval("var emleThis=result.snapshotItem(jj);" + emleOnLoad);
}
}