JSFiddle - React, Tailwind, and code Playground
HTML
<a class="direct" href="http://www.test.com/?event=23" data-redirect="http://www.test.com">Länk</a>
JavaScript
$(document).ready(function() {
$("a.direct").live("mousedown", function(e){
var oldurl = $(this).attr('href');
var newurl = $(this).attr('data-redirect');
$(this).attr('href', newurl);
});
});