DHTMLX Docs & Samples Explorer

forEachItem(handler)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxaccordion.js

iterator, calls a user-defined function n-times

  • handler - user-defined function, item's object is passed as incoming argument
    dhxAcc.forEachItem(function(item){
        // code here
    });
    // or
    function doWithItem(item){
        // code here
    });
    dhxAcc.forEachItem(doWithItem);