Is it possible to "nest" content from multiple HTML files with JQuery.load() ?
I want to be able to have all the HTML content in the top level "content" div.
My code example looks like this:
load.js - "firstLayer" loaded into "content" div
$(function () {
$('#content').load('/first.html #firstLayer', true)
$('#firstLayerContent').load('/second.html #secondLayer', true)
})
first.html
<div id="firstLayer">
<div id="firstLayerContent"></div>
</div>
second.html
<div id="secondLayer">
<p style="font-size: 100px;">Hello world</p>
</div>