I've added
Syntax Highlighting to my template:
- $document = &JFactory::getDocument();
- $document->addScript( '../media/system/js/jquery-1.7.1.js' );
- $document->addScript( '../media/system/js/jquery-ui-1.8.17.custom.min.js' );
- $document->addCustomTag( '<script type="text/javascript">jQuery.noConflict();</script>' );
$document = &JFactory::getDocument();
$document->addScript( '../media/system/js/jquery-1.7.1.js' );
$document->addScript( '../media/system/js/jquery-ui-1.8.17.custom.min.js' );
$document->addCustomTag( '<script type="text/javascript">jQuery.noConflict();</script>' );
To do this follow the instructions on the site but with one gotcha. When you add the javascript to the template, enclose the JS in a CDATA block:
- <script type='text/javascript'>
- PASTE THE JAVASCRIPT CODE HERE
- </script>
<script type='text/javascript'>
//<![CDATA[
PASTE THE JAVASCRIPT CODE HERE
//]]>
</script>
No comments:
Post a Comment