slick-carrousel
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
console.log('salut');
|
||||
// menu burger open
|
||||
|
||||
@@ -159,22 +160,71 @@ 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);
|
||||
// var slideIndex = 1;
|
||||
// showDivs(slideIndex);
|
||||
|
||||
function plusDivs(n) {
|
||||
showDivs(slideIndex += n);
|
||||
}
|
||||
// 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";
|
||||
}
|
||||
// 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";
|
||||
// }
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////
|
||||
|
||||
|
||||
(function($, window) {
|
||||
|
||||
// 'slick-carousel';
|
||||
var mobile = false;
|
||||
|
||||
$(function(){
|
||||
console.log("$ ready !!");
|
||||
|
||||
|
||||
// if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i)){
|
||||
// mobile = true;
|
||||
// }
|
||||
|
||||
if($(".path-frontpage").length > 0){
|
||||
console.log(".path-frontpage");
|
||||
// $("#"+).fadeIn();
|
||||
|
||||
$(".node-type-actualite").slick({
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 4,
|
||||
centerMode: true,
|
||||
centerPadding: '300px',
|
||||
// appendDots: $(element),
|
||||
dots: true,
|
||||
// appendArrows: $(element),
|
||||
arrows: true,
|
||||
// prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
|
||||
// nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 800,
|
||||
settings: {
|
||||
centerPadding: '0',
|
||||
}
|
||||
}]
|
||||
|
||||
});
|
||||
console.log(".node-type-actualite");
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
})(jQuery, window);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user