XHTML treats the content of the script tag as PCDATA while JavaScript is CDATA. You therefore need to wrap the embedded JavaScript in a CDATA tag.
Code:
<script type="text/javascript">
<![CDATA[
window.addEvent('domready', function() { new YOOtooltip('yoo-tooltip-1', '<img src="images/latest_work/aos.jpg" alt="Alt Text" /><p>Text goes here</p>', { mode: 'cursor', display: 'block', width: 315, style: 'default', sticky: 0 }); });
]]>
</script>
Note that will only work with XHTML and not with HTML as the content of the script tag in HTML is CDATA and browsers will not recognise the CDATA tag or its content if you include it in HTML.
Bookmarks