It will be easy for This allows you to write even more readable code by using .dataAttr('foo') , and results in a smaller file size after minification (compared to using .attr('data-foo') ). This example uses an attribute selector to return a list of the