Click here to Skip to main content
15,886,026 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

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

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

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