JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" class="myLink">При клике цвет ссылки меняется на случайный</a>
CSS
.myLink {
font-weight:bold;
text-decoration:none;
}
JavaScript
$('a.myLink').click(function() {
var newColor = 'rgb('
+Math.floor(Math.random() * 255) + ','
+Math.floor(Math.random() * 255) + ','
+Math.floor(Math.random() * 255) + ')';
$(this).css("color", newColor);
});