How do I Escape Javascript in XHTML for Validation
January 19, 2011
I’ve been doing some W3C validation lately and needed to look up how to escape javascript in documents with an XHTML transitional DTD. Here goes:
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
$(document).ready(function(){
//jQuery (or other javascript) fun goes here!!
});
/* ]]> */
</script>