Load precompiled list with js code

Load precompiled list with js code

Hi there!

Please forgive me if the answer for my question already exist on this forum (I tried to look for it but with no luck).
I have a huge list(around 75000) of <ul> and <li> elements. The code for creating menu from it requires to pass through each ul element and its children. It adds data( using .data()) and css properties. After processing menu works fine, but loading such huge list and passing through it takes alot of time(especially in IE and Opera). Są i thought I would put this menu in js file along with modifications made by jquery code. First part is easy but I don't know how to do second part. I though of putting it in js variable(uls, css and others) and then attach it to a div. Is it possible ?

Please help!
I will add extra info if something is unclear.

PS. Sorry for my bad English.