JSFiddle - React, Tailwind, and code Playground

by Craig Haywood

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<a href="http://www.google.com" id="no-link">Hyperlink</a>

<a href="http://www.cnn.com" >Hyperlink</a>

JavaScript

$(document).ready(function () {
          setTimeout(function () {
               
                $('a[href]').each(function () {
                    var href = this.href;
    
                    $(this).removeAttr('href').css('cursor', 'pointer').click(function () {
                        if (href.toLowerCase().indexOf("#") >= 0) {
    
                        } else {
                            window.open(href, '_blank');
                        }
                    });
                });
    
          }, 500);
    });