How to check visited link using jquery without using any plugin

How to check the visited link using jquery without using any plugin, please help solve this problem.

+3
source share
2 answers

Just check if it has a property :visited

if ($("a#theLink:visited").length) {
    //anchor tag with id of "theLink" has been visited
}

Strike>

edit : Remy Sharp created a jquery plugin to help locate visited links.

edit2 . This seems like a security issue. mozilla is now fixed, http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/

+6
source

Remy Sharp jQuery , "getComputedStyle", false mozilla, : http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/

+2

Source: https://habr.com/ru/post/1717409/


All Articles