Scenario:
I have an HTML unordered list.
I have a button that triggers an AJAX call that returns an HTML string that is a bunch of <li>...</li>
elements in plain text.
I want to add that bunch of li elements to the ul with Javascript.
What I know:
I know I can do something like:
newLi = document.createElement("li");
document.getElementById('#the_ul').appendChild(newLi);
But I don't know how to do something like:
newBunchOfLis = createThemFromHTML('<li>hello</li><li>bye</li>');
document.getElementById('#the_ul').appendChild(newBunchOfLis);
Question:
What do you suggest?