Check documentation for the latest version of dhtmlxSuite onDrop DHTMLX Docs

onDrop

fires when dnd ended and the dragged cell's position changed

void onDrop(string|number id,number indexOld,number indexNew);
idstring|numbercell id
indexOldnumbercell index before dnd
indexNewnumbercell index after dnd

Example

var myAcc = new dhtmlXAccordion({
    parent: "accObj",
    multi_mode: true,
    dnd: true,
    items: [
        { id: "a1", text: "Main Page" },
        { id: "a2", text: "Site Navigation" },
        { id: "a3", text: "Support & Feedback" },
        { id: "a4", text: "Comments" }
    ]
});
 
myAcc.attachEvent("onDrop", function(id, indexOld, indexNew){
    // your code here
});

Back to top