returning parent before children in getElementsByAttr