I have placed the below code inside of the tag.
The code you posted doesn't have an unterminated string literal. The error means that you've started a string with a single or double quote, but don't have a second quote of the same kind to close the string.
The problem is coming from the fact that your code includes </script>
in it. This is causing the browser to think that you're terminating your <script>
tag early. If you change your code to the following, it will work:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('head').append('<script type="text/javascript" src="../wp-includes/js/thickbox.js"></' + 'script>');
});
</script>
As you can see, the above code breaks the </script>
in your string into '</' + 'script>'
, so that the browser doesn't parse it as a closing tag.
Balaji ,
Use jquery' getscript , its very nice way of doing it , it will append in head section and less changes of errors
http://api.jquery.com/jQuery.getScript/
"unterminated string literal error" is not a Javascript error.
It hints towards a PHP script error, though. Post that code and you shall receive help.