According to Can scripts be inserted with innerHTML? I can use jquery getScript() Method to execute a remote javascript file loaded with Ajax.
But in my case, my script file is within an html file.
So does jquery have a method which can also cope with mixed html and javascript, or should I have to parse the file to separate all javascript from html and then inject them dynamically ?
If I just read all the file and put it in innerHTML, as javascript doesn't work, does it mean innerHTML is already cleaned from any javascript and I just need to inject the script within ?
What I'd like is to have the equivalent DOM of if I could include the html statically with an import.