sebastian of bam-interactive-dev
10/9/2019 - 10:16 AM

get index of dom item

findItemIndex (item) {
        var elements = item.parentNode.children;
        var nodes = Array.prototype.slice.call(elements);
        return nodes.indexOf(item);
    }