This should use `.data('relation', relation)` so that you can access the data attributes via Javascript as well. Setting via `.attr` doesn't enable this functionality, but `.data()` does :)