title: jQuery set attribute without value
body: <p>I want do do this in jQuery:</p>
  
  <pre><code>&lt;option value="test" selected&gt;...&lt;/option&gt;
  </code></pre>
  
  <p>But everything I've tried gives me:</p>
  
  <pre><code>&lt;option value="test" selected="selected"&gt;...&lt;/option&gt;
  </code></pre>
  
  <p>I have tried <code>.attr("selected", "")</code> as well as <code>.attr("selected", true)</code>, but they give the undesired <code>selected="selected"</code> result. How can I do this? Everything I've found on online suggests either the former or the latter of the above formats.</p>