jquery script in footer
Posted: Thu Dec 08, 2011 2:53 am
Hi,
Using Oxygen 12 or 13, I'm trying to have my DITA > XHTML transform include some JQuery javascript code. I thought the simplest way would be to use the args.ftr (or hdr) to inject the code. It has to be well-formed, so I've tried various permutations of CDATA tags. Surprisingly, the CDATA tags are written as-is to the XHTML, which obviously isn't what I want, and seems very odd.
I've tried things like:
I thought the contents of the CDATA tags would be written to the output, which it is, but includes the CDATA tags themselves! Preceding the CDATA tags with // seems to make no difference.
Any ideas? I suspect the problem is staring me in the face...
Thanks!
Pete
Using Oxygen 12 or 13, I'm trying to have my DITA > XHTML transform include some JQuery javascript code. I thought the simplest way would be to use the args.ftr (or hdr) to inject the code. It has to be well-formed, so I've tried various permutations of CDATA tags. Surprisingly, the CDATA tags are written as-is to the XHTML, which obviously isn't what I want, and seems very odd.
I've tried things like:
Code: Select all
<script language="JavaScript">
<![CDATA[
$(document).ready(function(){
... some jquery code ...
});
]]>
</script>
Any ideas? I suspect the problem is staring me in the face...
Thanks!
Pete