Jump to content

Lensmeister

New Members
  • Posts

    1
  • Joined

  • Last visited

Lensmeister's Achievements

Newbie

Newbie (1/14)

  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hoping someone can help me with this. The basis is a single webpage that has a fair amount of text on it but also has a feature thus: One line of three words: Cardiff | Manchester | Both Below is an image: Initially when the page loads it will have the cardiff.gif Then when Manchester is clicked the cardiff disappears and the manchester.gif appears in the same place. Same for when the Both word is clicked. I just need something simple/ I sourced this from the net html> <body> <img id ="imageOne" src ="circleRed.png" onclick = "changeColor()"/> <script> var image = document.getElementById("imageOne"); function changeColor() { if (image.getAttribute('src') == "circleRed.png") { image.src = "circleBlue.png"; } else { image.src = "circleRed.png"; } } </script> </body> </html> This is for clicking an image. to change things. I tried to edit for my needs but It just isn't working. I don't have a lot of experience with javascript or css. All help is gratefully received. Thanks in advance,
×
×
  • Create New...