Updated javascript so that the row and cell divs have a parent-child relationship