0

I have string in following format

<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "fivestar": { "titleUser": "Your rating: ", "titleAverag.... } });//--><!]]></script>

How can I output it from jquery script as a script in a page? I have tried

var elem = $mystring;
document.body.appendChild(elem);

But it does not work. Apparently there are some characters that shoud be escaped? Thank you for help

user1031742
  • 404
  • 1
  • 6
  • 20

0 Answers0