Reputation: 7461
How to check visited link using jquery without using any plugin please help to solve this problem
Upvotes: 3
Views: 6038
Reputation: 734
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/
Upvotes: 2
Reputation: 37771
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/
Upvotes: 6