Fix js issue for #416

* find data attribute even if in a parent element