Hi all!
I have a problem - surprise. I want to swap the content of my <div> (with the ID "content"), when the user press a bottom. I have tried using these, but with no result:
document.getElementById("content").innerHTML = "<script src=\"js/demo.js\" language=\"javascript\" type=\"text/javascript\"></script>";
$("<script src=\"js/demo.js\" language=\"javascript\" type=\"text/javascript\"></script>").appendTo('#content');
I can insert <p> tags with this method, but i can't use script tags this way.
So how do i insert a JavaScript to a specific <div> using Javascript or jQuery?
PS. I remove the content of #content like this:
jQuery('#content div').html('');