title: Mass-assigning link attributes based on proximity
body: <p>I've got this little piece of code which works a treat:</p>
  
  <pre><code>var r_link = $(".link_article a");
  var j_link = $(r_link).closest(".row").find(".read-more a");
  var attributes = r_link.prop("attributes");
  $.each(attributes, function() {
    j_link.attr(this.name, this.value);
  });
  </code></pre>
  
  <p>All's well and good other than the fact that it doesn't get the links' attributes based on proximity, the end result of which being that all the <code>j_link</code>s on the page have the same link and not the different ones they should. I can't access the <code>j_links</code> to give them IDs.</p>
  
  <p>Any thoughts? Cheers!</p>