[jQuery] Loading a page with javascript via ajax
Hello everybody!
How are you doing?
I have a very simple question: let's say i want to load a new page
into a div via ajax and that page is contains some javascript and
css.
Should I write the page i'm loading into a div like that (just like a
regular page):
<html>
<head>
<script src="myjavascript.js"></script>
<link rel="stylesheet" type="text/css" href="mycss.css">
</head>
<body>
<h1>Hello! I am the new content inside the div!</h1>
</body>
</html>
The thing is it's pretty weird to add full page with <html><head> etc.
On the other half, I want all the javascript & css calling to be on
the head.
Thanks,
Eyal