title: Toggle an element's attribute with jQuery?
body: <p>Building a tree menu with jQuery, and I want it to be accessible, so I'm using aria attributes. What I want to do is toggle the "aria-expanded" attribute from true to false on click/enter. I've tried this, but it's obviously not correct:</p>
  
  <pre><code>$(this).closest('ul').find('&gt; li.tree-parent').toggleAttr( 'aria-expanded', 'true false' );
  </code></pre>