title: adding a value to an attribute with jquery
body: <p>I am sure this is simple, I just dont seem to be able to get my head around it. I am trying to add a value of an attribute on click.</p>
  
  <p>So there is this button</p>
  
  <pre><code>&lt;input domain_id="9" class="home_send_but" value="send" type="button"&gt;
  </code></pre>
  
  <p>And when clicked</p>
  
  <pre><code>$('.home_send_but').click(function(){
      domain_id = $(this).attr('domain_id');
      $('#send_but').attr('domain_id').val(domain_id);
  });
  </code></pre>
  
  <p>It should add the domain_id of 9 to:</p>
  
  <pre><code>&lt;input domain_id="" id="send_but" type="button" value="Send Now"&gt;
  </code></pre>
  
  <p>However, the domain_id attribute for send_but remains as null.</p>
  
  <p>So how do I add a value to an attribute?</p>
  
  <p>And yes, I know I should be using data attributes.</p>