SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can I set visited and unvisited colors for a link from JS?

    Subject says it all, really. I want to have a script which iterates over all the links on a page and sets the visited and unvisited colors separately but I don't find anything in the DOM or CSS references I use that tells me what value to set. TIA.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I know you can do it with css:
    Code:
    a:link {color:red}
    a:visited {color:green}
    Any specific reason you want to use JavaScript to do this?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •