Objects

Objects

Hi everybody; I read arround that to retrieve a DOM object from a jQuery Object, I need to use the $.get(i) function, where the i is the index of the obect to retrieve; but.

The question is that I created an UL with LIs on the fly, something like:

  1. var list = $("<ul>").css("margin", "0px").css("padding", "5px");

And then added some Li's on the fly inside a loop, something like this:

  1. $("<li>").text(message).appendTo(list);

And now I want to pass the UL to a function that will display the UL as a kind of alert, but it recieves a string as the message. I did before passed a string literal with the UL and LI s tags and showed fine, but if I pass the "list" it shows me an "Object object", and if I pass it a list.get(0), it shows me a HTMLulObject or something like that ...
So how can i make the jQuery object list a simple and plain UL DOM element ???

Thanks in advance !! And happy eastern or pesaj to everybody !!! xD