HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Start slideshow
To prevent the slideshow from starting automatically, set the interval parameter to 0:
w3.slideshow(".nature", 0);
Add buttons to browse through the slideshow:
myShow = w3.slideshow(".slides3", 0);
When you initiate a slideshow, the w3.slideshow() function returns an object representing the slideshow.
var
myShow = w3.slideshow(".nature", 0);
The slideshow object contain properties and methods, such as next() and previous():
<button onclick="myShow.previous()">Previous</button>
<button onclick="myShow.next()">Next</button>
Any HTML element can be included in a slideshow.
Define which, by using CSS selectors.
Headers:
<h1 class="city">London</h1>
<h1 class="city">Paris</h1>
<h1
class="city">Tokyo</h1>
<script>
w3.slideshow(".city");
</script>