JSFiddle - React, Tailwind, and code Playground

by Asif Sharif Shahid

HTML

<span data-link="www.google.com.pk" class="q">text here</span>

CSS

.q {
  cursor: pointer;
}

JavaScript

$(".q").click(function() {
    window.location.href=$(this).attr('data-link');
});