This is how my code gets shown in my developer console (Chrome):
<script type="text/javascript">// <![CDATA[ function hidden(){ document.getElementById("test123").style.visibility = "hidden"; } document.getElementById("test123").addEventListener("click", hidden); var banner =document.querySelectorAll('.contactBanner1'); for(var i=0;i<banner.length;i++){ banner[i].addEventListener('mouseover',hidden,false); } // ]]></script> This is the error I get now: Uncaught SyntaxError: Unexpected token ILLEGAL
How do I correctly use the [?
<![CDATA[&//]]>, it works fine for me upon inspection. You running th eoutput through a parser/encoder of some kind?<![CDATA[&//]]>and I don't know how to use it. So I ran into this error.<script>tag and the next time I open it there automatically is theCDATA..