Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how do i add my prev/next btn to work in my script

display

 <div class="slider">
                <div class="slides">
                  <input type="radio" name="radio-button" id="radio1">
                  <input type="radio" name="radio-button" id="radio2">
                  <input type="radio" name="radio-button" id="radio3">
                  <input type="radio" name="radio-button" id="radio4">
                  <input type="radio" name="radio-button" id="radio5">
                  <input type="radio" name="radio-button" id="radio6">
<div>
        

                  <div id="next"><</div>
                    <div id="previous">></div>
                  <div class="navigation-manual">
                  <label for="radio1" class="manual-button"></label>
                  <label for="radio2" class="manual-button"></label>
                  <label for="radio3" class="manual-button"></label>
                  <label for="radio4" class="manual-button"></label>
                  <label for="radio5" class="manual-button"></label>
                  <label for="radio6" class="manual-button"></label>
                </div>
</div
  var counter = 1;
  setInterval(function()
  {document.getElementById('radio' + counter).checked = true;
  counter++;
  if(counter > 6){
    counter = 1;
  }
}, 5000);

I want to add the button next/previous function to my slider but I’m confused about writing the code, does anyone want to help?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Please refer to below javascript link and it will work for you 100%.

Click here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading