CodeNewbie
New Coder
Hi all,
I'm very new to coding and very green with JS, so please bear with me
I simply want to have a row of links at the top of a page (maybe 4 or 5 links) that when clicked on display an image below them that changes with each link press. I would also like to display some text at the bottom of the image. E.g. Link1 is "Grey Cat", when clicked shows a pic of a grey cat with text below that says "Grey Cat". Link2 is "Black Cat" etc.
This is as far as I got:
Any advice would be greatly appreciated!
I'm very new to coding and very green with JS, so please bear with me
I simply want to have a row of links at the top of a page (maybe 4 or 5 links) that when clicked on display an image below them that changes with each link press. I would also like to display some text at the bottom of the image. E.g. Link1 is "Grey Cat", when clicked shows a pic of a grey cat with text below that says "Grey Cat". Link2 is "Black Cat" etc.
This is as far as I got:
JavaScript:
<a href="#" onclick="this.src='https://upload.wikimedia.org/wikipedia/commons/3/3a/Russian_blue.jpg'" this.innerHTML = 'Grey Cat Wiki';>Grey Cat</a>
Any advice would be greatly appreciated!