I've found several instances of people having trouble using jQuery with a
document that implements custom HTML namespaces (i.e. <foo:bar />), and I
was wondering if anyone had developed any work-arounds?

I've recently been tasked with incorporating jQuery into our corporate
application -- largely due to my prodding and fanfare -- and the first area
I'm working on has some DOM manipulation, but it fails with jQuery due to
our namespacing that we use.

I am simply attempting to insert HTML into the document using html(). I'm
not sure what all the html() method does behind-the-scenes, but evidently it
does alot more than I ever gave it credit for. Using a pre-existing
implementation of Mootools, the content is inserted with no issues. Using
innerHTML, the content is inserted with no issues. Using .html(), the DOM
structure is clobbered and errors are thrown. I hacked the selector regex
and added in a ":" (for the namespaced items), but that seems to have little
effect on the final result.

Also, the HTML chunk I am inserting has a link to an external .js via
<script> tag, and for some reason that .js is loaded fresh, even though the
browser already has it cached; using Mootools, or .innerHTML, you can see
the browser request the .js but the server returns a 304 and thus its not
downloaded again. Why is jQuery forcing it to download, and can I disable
this?

Thoughts?

Thanks in advance,
Ken

Reply via email to