I'm experimenting with loading CSS for AJAX pages so that the styles are contained within each individual page instead of one large CSS file. My current approach is something like the following:
$("#content").load(pageid+".html #content > *", function etc...
The content being loaded into the page would be structured as follows:
<div id="content">
<style>
body{
background-color:blue;
}
</style>
content here
</div>
Edit: The challenge I'm facing is how to apply the style when it doesn't seem to be working as intended.