title: jquery get attributes
body: <p>I'm looking for a way to grab the custom attributes of a element with jquery.</p>
  
  <pre><code>&lt;span id='element' data-type='foo' data-sort='bar'&gt;&lt;/span&gt;
  </code></pre>
  
  <p>I'm looking to get: <code>["data-type", "data-sort"]</code> as an array.</p>
  
  <p>Anyone know how to do this?</p>
  
  <p>Thanks.</p>