123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- /**
- * @file
- * reha behaviors.
- */
- (function (Drupal) {
- 'use strict';
- Drupal.behaviors.reha = {
- attach: function (context, settings) {
- console.log('It works!');
- }
- };
-
- } (Drupal));
- jQuery(document).ready(function($){
- // menu déroulant
- ////////////// contacts ///////
- $(".bouton-contact").click(function(event) {
- // Fermer .connexion-full s'il est déroulé
- if ($(".connexion-full").is(":visible")) {
- $(".connexion-full").slideUp();
- }
- if ($(".connected-full").is(":visible")) {
- $(".connected-full").slideUp();
- }
- // Ouvrir .contacts-full
- $(".contacts-full").slideToggle();
- });
- ////////////// connexion ///////
- $(".bouton-connexion").click(function(event) {
- // Fermer .contacts-full s'il est déroulé
- if ($(".contacts-full").is(":visible")) {
- $(".contacts-full").slideUp();
- }
- // Ouvrir .connexion-full
- $(".connexion-full").slideToggle();
- });
-
- $(".bouton-connected").click(function(event) {
- // Fermer .contacts-full s'il est déroulé
- if ($(".contacts-full").is(":visible")) {
- $(".contacts-full").slideUp();
- }
- // Ouvrir .connected-full
- $(".connected-full").slideToggle();
- });
-
- $(".titre").click(function(event) {
- if ($(".connected-full").is(":visible")) {
- $(".connected-full").slideUp();
- }
- if ($(".contacts-full").is(":visible")) {
- $(".contacts-full").slideUp();
- }
- if ($(".connexion-full").is(":visible")) {
- $(".connexion-full").slideUp();
- }
- // // Ouvrir .connexion-full
- // $(".connected-full").slideToggle();
- });
-
- $("#edit-field-dossier-de-candidature-0--label").click(function(event) {
- event.preventDefault();
- // Ouvrir .connexion-full
- $("#edit-field-dossier-de-candidature-0--description>ul.main").slideToggle();
- });
- });
- // slideshow home
- (function($, window) {
- console.log('hello slick')
- $(document).ready(function(){
- $('.view-id-sites.view-display-id-block_1').slick({
- slidesToShow: 1,
- // slidesToScroll: 1,
- dots: false,
- arrows: true,
- centerMode: true,
- // centerPadding: '100px',
- responsive: [
- {
- breakpoint: 810,
- settings: {
- slidesToShow: 1,
- adaptiveHeight: true,
- arrows: false,
- draggable: true,
- centerMode: true,
- }
- }]
- });
- console.log('salut slick home');
- });
- $(document).ready(function(){
- $('.view-id-actus.view-display-id-block_1').slick({
- slidesToShow: 3,
- // slidesToScroll: 1,
- dots: false,
- arrows: true,
- centerMode: true,
- // centerPadding: '100px',
- responsive: [
- {
- breakpoint: 810,
- settings: {
- slidesToShow: 1,
- adaptiveHeight: true,
- arrows: false,
- draggable: true,
- centerMode: true,
- }
- }]
- });
- console.log('slick actu');
- });
- })(jQuery, window);
- // document.addEventListener('DOMContentLoaded', function() {
- // var nav = document.querySelectorAll('main-nav');
- // var links = nav.querySelectorAll('li > a');
- // console.log(links);
- // links.forEach(function(link) {
- // if (link.classList.contains('is-active')) {
- // nav.classList.add('has-active');
- // }
- // });
- // });
- // /////////////////
- //// ancre dans texte au click parragraphe correspondant arrive en dessous du header
- // (function($, window) {
- // var adjustAnchor = function() {
- // var $anchor = $('.block-views-blockhome-block-1'),
- // fixedElementHeight = 350;
- // if ($anchor.length > 0) {
- // $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
- // }
- // };
- // $(window).on('hashchange', function() {
- // adjustAnchor();
- // });
- // })(jQuery, window);
|