[jQuery] Odd problems with jQuery and XHTML in Firefox.
I have a full explanation of my issue on StackOverflow.com - if you're
interested in the code, please refer here:
http://stackoverflow.com/questions/1190763/firefox-not-running-jquery-for-xhtml-output
It is marked as answered, but ignore that.
The gist of the problem is when I load a *local* .xml file (in
firefox) the document transforms to XHTML, but the jQuery .append
('Ipsum Lorem
') (as well as prepend, prependTo, appendTo,
remove, etc) method silently fails to do anything. HOWEVER, if I
construct the node to append in this manner:
var frag = document.createDocumentFragment();
var p = document.createElement('p');
p.appendChild(document.createTextNode('Ipsum Lorem'));
frag.appendChild(p);
$('body').append(frag);
It works fine. Can anyone tell me why?
If I change my stylesheet to <output method="html" ... /> vs.
method="xml" the jQuery code starts working again - but I am
irrevocably tied to XHTML.