0

I found a way to legitimately use the CSS :visited selector: using it to move social media site sharing URLS a person has not been to yet to a separate 'More...' page to increase user convenience. Only problem is that it looks like its sandboxed a wee bit too much for even this to be possible.

So, how would I make links a person has visited disappear in one area while making those same links that disappeared then appear in another area?

To illustrate what i'm trying to do in a pseudo-like manner:

<!-- Display these outside the more menu if the user has visited their site -->
<a href="facebook URL" class="visitedSocialMediaSite" />
<a href="twitter URL" class="visitedSocialMediaSite" />
<a href="snapchat URL" class="visitedSocialMediaSite" />
<a href="(...) URL" class="visitedSocialMediaSite" />
<menu class="moreButton">
    <!-- If the user hasn't visited their site, then display them in here -->
    <a href="facebook URL" class="notVisitedSocialMediaSite" />
    <a href="twitter URL" class="notVisitedSocialMediaSite" />
    <a href="snapchat URL" class="notVisitedSocialMediaSite" />
    <a href="(...) URL" class="notVisitedSocialMediaSite" />
</menu>

I realize you could extrapolate about what-ifs endlessly about this. For example, what if the user got a new computer, and this is the first site they go to? However, i'm not interested in what-ifs, rather i'm interested in making the site a little more accessible for well over 99% of its users.

EDIT

I am targeting modern browsers. Modern browsers do not include IE < 8 which is what would be required for the security breeches in the :visited persuado class.

0 Answers0