Can someone give me advise how to do this?

Hi, I had an idea of making this for my website. It might be too difficult to my level but maybe with some advice I could make it.

I was thinking of making a dialogue that changes when you click on next, or go back to the previous part by clicking on previous. Each page has it’s own image. So the image changes when changing pages.

Is there a tutorial or website where I can learn this?
Is this possible with html and css only? Or should I also use javascript?

With all due respect, the basic HTML and CSS courses will give you the knowledge you need to made this.

1 Like

Hi @Wassenaar,
That’s a pretty good idea. You want to change the image and the text using the Previous and Next buttons. That’s achievable, but you might want to use a little JavaScript for that. A basic way to do it would be to create an array of objects. Your buttons each trigger a function that changes the src of the img element and the innerHTML of the text to the value of an object in that array. It might look confusing, but it’s not that hard. You can definitely do it.
Unfortunately, I couldn’t find any video that specifically works on such a thing. The JavaScript course here on FCC might help you deal with arrays. Maybe the Music Player project?

You can also reach out if you need any help.
Good luck!

1 Like