Here is a demo page that shows how to load mb.containerPlus via ajax into the page.
I've made a little function that add an mb.containerPlus via ajax and initialize it once on the page:
function insertMbContainerPlus(url, containerId, data){
if(document.containers[containerId]==1 || !url) return;
if(!data) data="";
$.ajax({
url: url,
cache:false,
data:data,
success: function(html){
$("body").append(html);
//to prevent that the opened container is flagged as "closed" on the cookie
$("#"+containerId).mb_removeCookie("closed");
$("#"+containerId).buildContainers({
containment:"document",
elementsPath:"../elements/",
effectDuration:200,
onLoad:function(o){
document.containers[o.attr("id")]=1;
},
onClose:function(o){
o.mb_removeCookie("closed");
o.remove();
document.containers[o.attr("id")]=null;
}
});
}
});
}