JSFiddle - React, Tailwind, and code Playground

HTML

<div id="navigation">
    <div class="utility">
        <div><a href="http://www.google.com">Google</a> (Google is not a duplicate)</div>
        <BR>
        <div class="test"><a href="http://www.example.com">Example</a> (Example is a duplicate)</div>
        <BR>
        <div><a href="http://www.amazon.com">Amazon</a> (Amazon is a duplicate)</div>
        <BR>
        <div><a href="http://www.amazon.com">Amazon</a> (Amazon is a duplicate)</div>
        <BR>
        <div class="hello"><a href="http://www.intranet.com">Intranet</a> (Intranet is not duplicate)</div>
        <BR>
        <div class="world"><a href="http://www.example.com">Example</a> (Example is a duplicate)</div>
        <BR>
        <div><a href="http://www.example.com">Example</a> (Example is a duplicate)</div>
        <BR>
    </div>
</div>
</div>

JavaScript

$("a").click(function() {
    if ($("a[href='" + $(this).attr("href") + "']").length > 1) {
        thisAttr = $(this).closest().attr('class');
        alert('\nClass = ' + thisAttr + ' \n\nYes, this is duplicate link\n\n');
        return false;
    } else {
        alert('\nNo, this is NOT a duplicate link\n\n');
        return false;
    }
});