title: How to add an id attribute to a html tag with a certain class using jQuery?
body: <p>I have a link with a class of <code>special</code> and I want to add an id attribute to it.</p>
  
  <p>Only one element in my document will have this class at any one time (I may remove and add a new one at some point).</p>
  
  <p>How would I add an id attribute to the element to change it from this:</p>
  
  <pre><code>&lt;div class="special"&gt;
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>&lt;div id="special-12345" class="special"&gt;
  </code></pre>