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 id but a class:
id
<a href="http://example.com/share" class="MyClass">Yummy</a>