I know understand more about how jQuery stores data.
Is there any advantage to doing one or the other of these:
$(\'#editCity\').data(\'href\', \"xx\");
They both have advantages... That said, 99% of the time you should be using .data('whatever', value)
Advantages of using .data('whatever', value):
Advantages of using .attr('data-whatever', value):
.data('whatever')$('[data-whatever=foo]')