Firstly, sorry for my English (I'm from China).
By reading this article(how to apply jQuery element selection to a string variable), I can successfully get Elements from a String which stores HTML text. For example:
var htmlstr = "<div><ul><li>some text 1</li></ul></div><div><ul id=list><li>some text 2</li></ul></div>";
var s = $('ul#list', $(htmlstr)).html();
s will be <li>some text 2</li>. It's what I want.
But the question is, if I want to add another LI element to this string (htmlstr) how can I do?
I set s = new html string but htmlstr doesn't change.
Thanks