title: jQuery .toggleId() add remove div id?
body: <p>I have tried some solutions but nothing seems to work. I want to change the div id to one another (example: #red to #blue and then back to #red) just like <code>.toggleClass()</code>. I tried to toggle attribute but it didn't works.</p>
  
  <p>I already used <code>classes</code> with <code>!important</code> tags to elements. So the only thing left is to use id's.</p>
  
  <p><a href="http://jsfiddle.net/w7Q3G/" rel="nofollow">jsfiddle</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="red"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>#red{
      width:100px;
      height:100px;
      background:red;
  }
  #blue{
      width:100px;
      height:100px;
      background:blue;
  }
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>$("#red").click(function () {
      $(this).attr("id", "#blue");
  });
  </code></pre>