- i’m using jquery. i have a anchor list. i’m enumerate anchors, if it visited, set display:none;
- i need when click on the anchor, anchor will changed to visited state from javascript?
How can i do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yeah, see here for an example. It uses
getComputedStyleto find out if a link has been visited. There’s also a variant of this hack that doesn’t require scripting.The relevant part of the example is this (modified for clarity):
May I ask what do you need it for?
Edit: WRT #2, you could open the link in an
iframe. That would mark it as visited in the browser history. Like so:Edit: You can create new CSS rules with JS. There’s a jQuery plugin to make it more simple. Basically, you would do it like this: