Use .data() instead of .attr('data-')