JSFiddle - React, Tailwind, and code Playground

HTML

<a href="http://www.google.com" rel="external">Google</a>
<a href="http://www.yahoo.com">Yahoo</a>

JavaScript

$$('a[rel*=external]').each(function(item) {
    $(item).observe('click', function(event) {
        window.open(this.href);
        event.stop();
    });
});