tentative slideshow bandeau actu home

This commit is contained in:
2023-06-21 00:20:44 +02:00
parent 90cd59bf62
commit b3af161cb1
9 changed files with 194 additions and 14 deletions
+22
View File
@@ -156,3 +156,25 @@ jQuery(function($) {
// ///////////////////////////////
// slideshow home // work but does the same for all node-type-actualite, faut limiter à ceux dans la path-frontpage
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function showDivs(n) {
var i;
var x = document.getElementsByPath("node-type-actualite");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length} ;
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "block";
}
/////////////////////////////////////////////////