title: jQuery get attributes and values of element
body: <p>Say I have this HTML code:</p>
  
  <pre><code>    &lt;img id="idgoeshere" src="srcgoeshere" otherproperty="value" /&gt;
  </code></pre>
  
  <p>I can reference the element by its id: <code>$('#idgoeshere'))</code> Now, I want to get all the properties and their values on that element:</p>
  
  <pre><code>src=srcgoeshere
  otherproperty=value
  </code></pre>
  
  <p>Is there some way I can do that programmatically using jQuery and/or plain Javascript?</p>