Extract findNextSibling
Extract findFirst and LastSibling
Refactor to return the attr('data-id') straight away