One thing you could do is use the insertAfter()
or after()
functions. You can see in this example: http://jsfiddle.net/83CSK/
You generate the list as a string in javascript then you pass it through as a selector to jquery which will create the dom element and place it after the selector.
Docs on this function can be found here: http://api.jquery.com/insertafter/