How can I use jQuery.load to replace a div including the div

Could you refine your selector in the load() method?

For example,

$("#secondHeader").load("/logged-in-content.html #secondHeader > *");

This way, you’re not grabbing the div itself, you’re grabbing its contents.

Leave a Comment