It's been a while since my jQuery days and I was just struck by the realization that the following code:
$("#add").append("<div>1</div>").append("<div>2</div>")
didn't add a div with an inside div but rather two divs. I can do something like this
$("#add").append("<div>1<div>2</div></div>")
but it seems to me like hiding my ignorance, rather than producing a trustworthy solution. How can I append something with appended sub-elements?