123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- function slides() {
- var Home = document.querySelector('.hero .slide');
- if (Home != null) {
- var flkty = new Flickity( Home, {
- cellAlign: 'left',
- autoPlay: true,
- prevNextButtons: false,
- fade: true,
- });
- }
- var prive = document.querySelector('.prive .__slide');
- if (prive != null) {
- var flkty = new Flickity( prive, {
- // options
- cellAlign: 'left',
- autoPlay: true,
- })
- }
- var slide_tpsF = document.querySelectorAll('.tpsF .slide');
- if (slide_tpsF != null) {
- for (var i = 0; i < slide_tpsF.length; i++) {
- var flkty = new Flickity( slide_tpsF[i], {
- // options
- cellAlign: 'left',
- autoPlay: true,
- pageDots: false
- });
- }
- }
- var Partenaires = document.querySelector('.container_slide ul');
- if (Partenaires != null) {
- var flkty = new Flickity( Partenaires, {
- cellAlign: 'left',
- pageDots: false
- // groupCells: true,
- // carousel-cell: true,
- });
- }
- }
- function masonry() {
- var arrayEnga = document.querySelector('.tableau_engagements.row');
- if (arrayEnga != null) {
- var msnry = new Masonry(arrayEnga , {
- //columnWidth: '.engagement',
- columnWidth: '.engagement',
- itemSelector: '.engagement',
- gutter: '.gutter-sizer',
- percentPosition: true
- });
- }
- }
- function burger() {
- var hamburgers = document.querySelector(".hamburger");
- var nav = document.querySelector(".nav-main");
- hamburgers.addEventListener("click", function() {
- this.classList.toggle("is-active");
- nav.classList.toggle("is-active");
- });
- }
- function paralax() {
- var rellax = new Rellax('.paralax', {
- center:true
- });
- }
- function isotope() {
- var $grid = $('.grid').isotope({
- percentPosition: true,
- masonry: {
- columnWidth: '.item'
- },
- itemSelector: '.item',
- stagger: 30
- });
- $('.filter-button-group li').on( 'click', function(evt) {
- var filterValue = $(this).attr('data-filter');
- $grid.isotope({ filter: filterValue });
- });
- }
- function drag(){
- $( '.group_drag' ).draggable({
- containment: "html",
- scroll: false
- });
- }
- function click_nav() {
- $('#nav-main > ul > li:first-child > a').click(function(e) {
- e.preventDefault();
- })
- }
- $( document ).ready(function() {
- slides();
- masonry();
- burger();
- paralax();
- isotope();
- drag();
- click_nav();
- });
|