Click here to Skip to main content
15,070,974 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to change visited link color in jquery. for example google hypwer link after press event. Please help ....

What I have tried:

function Read() {
var nodesArray = document.getElementById('divitemlist').getElementsByTagName('a');
for (i = 0; i < data.length; i++) {
nodesArray[i].style.color = 'red';
}
}

its change in temporally , but i want to change like google link .
Posted
Updated 22-Aug-16 7:48am
Comments
xszaboj 22-Aug-16 5:51am
   
You should be able to do it through css as well.
Here is an example:
http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_visited
Thiyagu Arockiasamy 22-Aug-16 6:09am
   
dear sir i tryed . its work for fully div. but i using retrieve the values in single div element using jquery. if i want to press any one of link at a particular link color is changed others not be changed. pls give any solution
[no name] 22-Aug-16 7:04am
   
Hi Friend did you add css class in your code?
Karthik_Mahalingam 22-Aug-16 9:25am
   
http://www.w3schools.com/css/css_link.asp
it should work.
Thiyagu Arockiasamy 23-Aug-16 1:32am
   
sir i have one doubt. if i clear cookies visited links are also cleared in naormal? and also if i use one system to another system the visited link is stayed ? pls tel
Karthik_Mahalingam 23-Aug-16 2:04am
   
yes
if i use one system to another system the visited link is stayed - no
Thiyagu Arockiasamy 23-Aug-16 2:23am
   
sir i want to one system to another system the visited link is stayed. how can i do it sir . any ideas
Karthik_Mahalingam 23-Aug-16 3:31am
   
have an unique class for it.
Thiyagu Arockiasamy 23-Aug-16 4:56am
   
okay sir
Thiyagu Arockiasamy 23-Aug-16 3:12am
   
for example user wise login method sir. like gmail login after search ..
Karthik_Mahalingam 23-Aug-16 3:18am
   
Gmail has id for each entry to track the details apply css based on that

Hi Friend Refer below link. it is very helpful to you.

How to style a visited link for only a single page view - Quora[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900