Hi,
There is no built in method to “kill” the current cBox instance to rewrite it, but you should be able to use this code:
// Clear existing cBox
$("*[id*=commentBoxInstanse_1").html("");
// Change the placeholderID and threadID
cBoxArg.placeholderID = "commentBoxInstanse_2";
cBoxArg.threadID = "commentBoxInstanse_2"+cBoxArg.threadID.split(":")[1];
// reset data object
spjs.cBox.data.commentCount = {};
spjs.cBox.data.currDatasetIDArr = {};
spjs.cBox.data.currDatasetLastID = [];
spjs.cBox.data.itemData = {};
spjs.cBox.data.settingsObj = {};
// Call function
spjs.cBox.init(cBoxArg);
Note the placeholderID “commentBoxInstanse_1” which is the default one, which is changed to “commentBoxInstanse_2”. This means you must have a placeholder for each of the cBox instances on the page.
Hope this helps,
Alexander