Can you help in creating QUIZ PAGE

Hi… I want to make a quiz page where when people submit answer the next question page comes from side. I don’t know if you can understand this …as i am new to the programming world.
here is the code i have written

  <div class="quiz-field">
    <div class="slides slide1">
    <div class="slides slide2">
    <div class="slides slide3">
    <div class="slides slide4">
    <div class="slides slide5">
  <button onclick="myfun()">Click me</button>

as this is not complete code there will be quetions and checkboxes.
but i can’t make it the way i want.
i want all the other div to be hidden only the first div visible.
And after answering the first question user will click on button, which will lead them to second div.but the second div should slide in. and so on

i tried many javascript fuction and loops but can get the results. can anyone help me with it

I think jQuery would work well for this. It’s further on in the curriculum but what you are looking for:

i actually know jquery. But still can’t figure it out

you could use bootstrap carousel to do this as it has a few different options for carousel sliders

or some other libraries such as glide or slick