User:Danlev/quicklist.js

/* QUICKLIST Created by Dan Leveille (User:Danlev) www.dan-lev.com */

/* Commenting this out for now because it's not working anymore. $(quicklist);

function quicklist { var quicklist = document.createElement('div'); quicklist.setAttribute('id','p-quicknav'); quicklist.setAttribute('class','portal'); var ql_h5 = document.createElement('h5') ql_h5.appendChild(document.createTextNode('Quick List')); quicklist.appendChild(ql_h5); var ql_div = document.createElement('div') ql_div.setAttribute('class','body'); quicklist.appendChild(ql_div); var ql_ul = document.createElement('ul') ql_div.appendChild(ql_ul); for (i=0;i<quickListArray.length;i++){ var a_link_p = quickListArray[i].split('|') //alert(quickListArray[i]); var a_link = document.createElement('a'); a_link.setAttribute('href',a_link_p[0]); var a_link_text = document.createTextNode(a_link_p[1]); a_link.appendChild(a_link_text); var a_li = document.createElement('li') a_li.appendChild(a_link); ql_ul.appendChild(a_li); }	document.getElementById('panel').appendChild(quicklist); }