How to check visited link using jquery without using any plugin
Question
How to check visited link using jquery without using any plugin please help to solve this problem
Solution
Just check if it has the :visited
property
if ($("a#theLink:visited").length) {
//anchor tag with id of "theLink" has been visited
}
edit: Remy Sharp has made a jquery plugin to help detect visited links.
edit2 Look like this was security issue mozilla has fixed now, http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/
OTHER TIPS
Remy Sharp jQuery plugin won't work anymore because it uses "getComputedStyle" which will always return false in mozilla as explain here : http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow