New wiki-page
Revision as of 23:01, 21 July 2017 by Ikabodo (talk | contribs)
Jump to navigation Jump to search

<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">

Slideshow Indicators

An example of using buttons to indicate how many slides there are in the slideshow, and which slide the user is currently viewing.

Irish Irish Logres Anarchy Lothain Saxons Saxons Escavalon Cornwall Cambrian hill-men Saxons Britain499 Picts Malahaut Gomeret Cameliard Salisbury Summer- land Gentian Silchester Dorsette Jagent Ascalon Tintagel Cornwall Lyonesse West Seaxe Wight Suth Seaxe Kent Caerwent Caercolun Huntland Hartland Thames- mouth Rydychan Berroc Linden Bedegraine Clarence Tribruit Wuer- ensis Lonazep Lambor Glevum Escavalon Estragales Cameliard Cheshire Norgales Gomeret Roestock Amans Pase Lestroite Rheged Malahaut Diera Nohaut Cambernet North- umbria Maris Powys Orofoise Galvoie Ergynn Cardigan Ystrad Tywy Builth Elfael Brycheiniog Merionydd Gwaelod Gore Lothain Garloth Escoe Strangorre Benoic Orkneys Western Isles Long Isles Connacht Pomitain Out Isles Munster Leinster Meath Eire Oriel Ailech Dal Riada Dal Araide Dal Fiatach
Irish Irish Logres Anarchy Lothain Saxons Saxons Escavalon Cornwall Cambrian hill-men Saxons Britain499 Picts Malahaut Gomeret Cameliard Salisbury Summer- land Gentian Silchester Dorsette Jagent Ascalon Tintagel Cornwall Lyonesse West Seaxe Wight Suth Seaxe Kent Caerwent Caercolun Huntland Hartland Thames- mouth Rydychan Berroc Linden Bedegraine Clarence Tribruit Wuer- ensis Lonazep Lambor Glevum Escavalon Estragales Cameliard Cheshire Norgales Gomeret Roestock Amans Pase Lestroite Rheged Malahaut Diera Nohaut Cambernet North- umbria Maris Powys Orofoise Galvoie Ergynn Cardigan Ystrad Tywy Builth Elfael Brycheiniog Merionydd Gwaelod Gore Lothain Garloth Escoe Strangorre Benoic Orkneys Western Isles Long Isles Connacht Pomitain Out Isles Munster Leinster Meath Eire Oriel Ailech Dal Riada Dal Araide Dal Fiatach
Irish Irish Logres Anarchy Lothain Saxons Saxons Escavalon Cornwall Cambrian hill-men Saxons Britain499 Picts Malahaut Gomeret Cameliard Salisbury Summer- land Gentian Silchester Dorsette Jagent Ascalon Tintagel Cornwall Lyonesse West Seaxe Wight Suth Seaxe Kent Caerwent Caercolun Huntland Hartland Thames- mouth Rydychan Berroc Linden Bedegraine Clarence Tribruit Wuer- ensis Lonazep Lambor Glevum Escavalon Estragales Cameliard Cheshire Norgales Gomeret Roestock Amans Pase Lestroite Rheged Malahaut Diera Nohaut Cambernet North- umbria Maris Powys Orofoise Galvoie Ergynn Cardigan Ystrad Tywy Builth Elfael Brycheiniog Merionydd Gwaelod Gore Lothain Garloth Escoe Strangorre Benoic Orkneys Western Isles Long Isles Connacht Pomitain Out Isles Munster Leinster Meath Eire Oriel Ailech Dal Riada Dal Araide Dal Fiatach
   <button class="w3-button w3-light-grey" onclick="plusDivs(-1)">❮ Prev</button>
   <button class="w3-button w3-light-grey" onclick="plusDivs(1)">Next ❯</button>
 <button class="w3-button demo" onclick="currentDiv(1)">1</button> 
 <button class="w3-button demo" onclick="currentDiv(2)">2</button> 
 <button class="w3-button demo" onclick="currentDiv(3)">3</button> 

<script> var slideIndex = 1; showDivs(slideIndex);

function plusDivs(n) {

 showDivs(slideIndex += n);

}

function currentDiv(n) {

 showDivs(slideIndex = n);

}

function showDivs(n) {

 var i;
 var x = document.getElementsByClassName("mySlides");
 var dots = document.getElementsByClassName("demo");
 if (n > x.length) {slideIndex = 1}    
 if (n < 1) {slideIndex = x.length}
 for (i = 0; i < x.length; i++) {
    x[i].style.display = "none";  
 }
 for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" w3-red", "");
 }
 x[slideIndex-1].style.display = "block";  
 dots[slideIndex-1].className += " w3-red";

} </script>