Changing the style of one element with JavaScript

Discussion in 'JavaScript' started by dill, Jan 3, 2007.

  1. #1
    Hello,

    I'm trying to create an effect of text being hidden and then revealed when you hover your mouse over it. I have achieved this using by styling anchors with CSS here: http://mythbustersresults.com/results/all_guess.html

    I don't think this is the best solution though because the anchors are clickable and they don't really go anywhere except the top of the page, which will probably annoy visitors.

    Is there a nice clean way to do this with JavaScript? I definately don't want to use images - I want the styling of the paragraph element to change. I've found solution that's very close here: http://alistapart.com/articles/dropdowns but I am not good enough with JS yet to modify it to my needs.
     
    dill, Jan 3, 2007 IP
  2. KalvinB

    KalvinB Peon

    Messages:
    2,787
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #2
    how about styling a div tag. You can style anything.
     
    KalvinB, Jan 5, 2007 IP