javascript - How to create a slideshow with functions not images? -


i trying create slideshow function adds , removes layers in map through 2 buttons. example of instead of images, want < > buttons add , remove layers. https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_slideshow problem hitting not know how add layer map without creating clickable button. using onclick, requiring user click on button use function. want function called once slideshow javascript gets "myslides" class. html code below:

                 <div class="slideshow-container">                     <div class="myslides">                         <input class="cmn-toggle cmn-toggle-round" type="checkbox" onclick="togglesewer();">                         <label for="cmn-toggle-sewer">                         </label>                         <p class="child">sewer</p>                     </div>                     <div class="myslides">                         <input id="cmn-toggle-water" class="cmn-toggle cmn-toggle-round" type="checkbox" onclick="togglewater();">                         <label for="cmn-toggle-water"></label>                         <p class="child">water</p>                     </div>                     <div class="myslides">                         <button1 class="fa fa-chevron-left" onclick="toggleortho();"></button1>                         <p id="watermainlayer();">ortho</p>                     </div>                     <a class="prev" onclick="plusslides(-1)">&#10094;</a>                     <a class="next" onclick="plusslides(1)">&#10095;</a>                 </div> 

after clicking "prev" or "next", button created. if click button, end result want. there way can add sewer layers without adding button in process?


Comments