title: How to add click event to an element?
body: <p>I would like to add a click event in plain JavaScript (without using jQuery) to an element like this, so I don't have an <code>id</code> but a class:</p>
  
  <pre><code>&lt;a href="http://example.com/share" class="MyClass"&gt;Yummy&lt;/a&gt;
  </code></pre>