In JavaScript (preferably jQuery) how could I create a new element and set its values, but I want it in a specific place In the document.

My divs are structured like this :

      [item to be created inserted here]


I know how to do this and insert it before the end body tag, but not like this.
I also say in jQuery, as most of my site is written in jQuery (only the js parts)

Thanks, Matthew.


to replace the inner HTML of #item,


to add something before #item,


to add something after #item,


to add something to the HTML in #item

or just use JavaScript:

document.getElementById('item').innerHTML = "...";