Basic Javascript Q

Out of context: Reply #5

  • Started
  • Last post
  • 19 Responses
  • rafalski0

    <a id="linky" href="" onMouseOver="document.MyImage.src='image2.gif';" onMouseOut="document.MyImage.src='image1.gif';"> blah</a>

    <img id="MyImage" src="http://www.jodybarton.co.uk/JodyBarton/Typography/blah-blah-blah.jpg" onMouseOver="document.getElementById('linky').classname='onState'" onMouseOut="document.getElementById('linky').classname='offState'" />

    then define .onState and .offState in CSS alongside :link and :hover

    needs to be tested though :)

View thread