Which one is better:
$(\'div\').attr(\'data-stuff\');
or
$(\'div\').data(\'stuff\');
After having a discu
Taking what all people have said into consideration, here is "the answer":
.data is better because:
.attr is better because:
I think I will continue using .attr myself, but thank you all for this information :)