I've been fooling around with a very minimalistic jquery admin area menu. The thing is I want jQuery to build 3 equal menus with different ID's. I managed to do this by creating a function and call it 3 times with different variables, but I'd like to ask my first question on this lovely community:
What is the most minimalistic and efficient way of creating 3 elements with different IDs and content?
d=['Varer','Kate','Produ','Tilbud','Sider','Info','Pref'];
e=['Varer1','Kate1','Produ1','Tilbud1','Sider1','Info1','Pref1'];
f=['Varer2','Kate2','Produ2','Tilbud2','Sider2','Info2','Pref2'];
function menu(){
var e='';
$.each(d,function(a,b){e+='<a href=#'+b+'>'+b+'</a>'});
$('body').append('<div id=c>'+e+'</div>');}
menu();
Thanks in advance