It is a common misunderstanding that .data('key') is simply a shortcut for .attr('data-key')
How to better manage jQuery event handlers