JSFiddle - React, Tailwind, and code Playground
by Jogesh Sharma
HTML
<a href="#coastline">link one</a>
<a href="#onshore">link two</a>
<a href="">link three</a>
CSS
.gray{color: #ccc;}
.green{color: green;}
.yello{color: yellow;}
body{background:#333;}
JavaScript
$('a').each(function(i){
if($(this).attr('href') == "#coastline") $(this).addClass('gray');
if($(this).attr('href') == "#onshore") $(this).addClass('green');
if($(this).attr('href') == "") $(this).addClass('yello');
});