function delegate(ele, e)
{
ele.addEventListener(e, function(){
let mcs = Array.from(this.querySelectorAll('.mc'));
if(mcs.indexOf(event.target) > -1)
{
console.log(mcs.indexOf(event.target));
console.log(mcs);
}
});
}
window.onload = function()
{
let parent = document.getElementById("parent");
delegate(parent, 'click');
}