[jQuery] Appending text works; appending element doesn't
Test case at http://apache.pastebin.ca/1261109
When the H1 is edited and the OK button clicked, the callback is
invoked. It *should* add some plaintext to the end of the H1 content,
and also a <span> element. However, it doesn't add the <span>.
I have run through this with Firebug and set a breakpoint in the
callback. I haven't stepped into the actual jQuery code because I'd
get lost ;-) but I verify that plaintext gets added but <span>
doesn't.
However, while halted in the callback, I can manually (in the Firebug
console) issue the identical $(this).append('<span>foo</span>') -- and
it works.
What's going on? I'm doing something really obvious wrong, aren't I?