Results 1 to 2 of 2

Thread: Using JS to modify styles

  1. #1
    Join Date
    Jun 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using JS to modify styles

    I have a script that fades link colors when the mouse hovers over the link, but it fades all links to the same preset color.

    I'd like to modify this script to fade to the a.classname:hover color but I don't know how to get the pseudo-class value using Javascript. Is this possible, and if so how?

    Thanks in advance!

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by huntercc
    I'd like to modify this script to fade to the a.classname:hover color but I don't know how to get the pseudo-class value using Javascript. Is this possible, and if so how?
    Not to my knowledge. The getComputedStyle method can accept as its second argument, the name of a pseudo-element, but not a pseudo-class.

    Mike

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
  •