Putting scripts inside a query string
Sorry if this is a bit vague but How do I put an existing Script string inside a $("div).html(Script)
This is what I have tried but it all goes wrong after the </script>"); and displays all the content for the rest of the script in text
else if (myDay == 1 && myhour >= 11 && myhour <= 17) {
$('#chatButton').html("<br><script type='text/javascript'>if (typeof sWOTrackPage == 'function')sWOTrackPage();</script>");
}
Thanks