I want to add a simple check icon after every link that the user has visited on my website.
Here is what I have tried to so far:
CSS
.accomm-panel:visited h5:after {
content: "\f00c";
color: #80b54d;
}
Note: The ".accomm-panel" class is the anchor link. I only want to target visited links and the look for the h5 element and attach the icon.
JS
$('.accomm-panel:visited h5').after('<i class="fa fa-check fa-1"></i>');
HTML
<a href="http://localhost/gbtc/accommodation/029gb-step-back-in-time/?_sfm_low_season_fee=0+10000" class="accomm-panel">
<div class="img-container" style="background-image: url('http://localhost/gbtc/wp-content/uploads/2015/05/gordons-bay-harbour-wall-sunset.jpg');">
<div class="price">
<p>From</p>
<p class="amount">R</p>
</div>
</div>
<div class="panel-content">
<h5>Step Back in Time</h5>
<p class="description">1 Guest • 12 Bedrooms • 12 Bathrooms • 029GB</p>
</div>
</a>
Neither of these methods work. This article outlines that due to user privacy issues, the suggestions in the article are unlikely to work.
I'd like to know if there's a workaround for these issues.