reha.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /**
  2. * @file
  3. * reha behaviors.
  4. */
  5. (function (Drupal) {
  6. 'use strict';
  7. Drupal.behaviors.reha = {
  8. attach: function (context, settings) {
  9. console.log('It works!');
  10. }
  11. };
  12. } (Drupal));
  13. jQuery(document).ready(function($){
  14. // menu déroulant
  15. ////////////// contacts ///////
  16. $(".bouton-contact").click(function(event) {
  17. // Fermer .connexion-full s'il est déroulé
  18. if ($(".connexion-full").is(":visible")) {
  19. $(".connexion-full").slideUp();
  20. }
  21. if ($(".connected-full").is(":visible")) {
  22. $(".connected-full").slideUp();
  23. }
  24. // Ouvrir .contacts-full
  25. $(".contacts-full").slideToggle();
  26. });
  27. ////////////// connexion ///////
  28. $(".bouton-connexion").click(function(event) {
  29. // Fermer .contacts-full s'il est déroulé
  30. if ($(".contacts-full").is(":visible")) {
  31. $(".contacts-full").slideUp();
  32. }
  33. // Ouvrir .connexion-full
  34. $(".connexion-full").slideToggle();
  35. });
  36. $(".bouton-connected").click(function(event) {
  37. // Fermer .contacts-full s'il est déroulé
  38. if ($(".contacts-full").is(":visible")) {
  39. $(".contacts-full").slideUp();
  40. }
  41. // Ouvrir .connected-full
  42. $(".connected-full").slideToggle();
  43. });
  44. $(".titre").click(function(event) {
  45. if ($(".connected-full").is(":visible")) {
  46. $(".connected-full").slideUp();
  47. }
  48. if ($(".contacts-full").is(":visible")) {
  49. $(".contacts-full").slideUp();
  50. }
  51. if ($(".connexion-full").is(":visible")) {
  52. $(".connexion-full").slideUp();
  53. }
  54. // // Ouvrir .connexion-full
  55. // $(".connected-full").slideToggle();
  56. });
  57. $("#edit-field-dossier-de-candidature-0--label").click(function(event) {
  58. event.preventDefault();
  59. // Ouvrir .connexion-full
  60. $("#edit-field-dossier-de-candidature-0--description>ul.main").slideToggle();
  61. });
  62. });
  63. // slideshow home
  64. (function($, window) {
  65. console.log('hello slick')
  66. $(document).ready(function(){
  67. $('.view-id-sites.view-display-id-block_1').slick({
  68. slidesToShow: 1,
  69. // slidesToScroll: 1,
  70. dots: false,
  71. arrows: true,
  72. centerMode: true,
  73. // centerPadding: '100px',
  74. responsive: [
  75. {
  76. breakpoint: 810,
  77. settings: {
  78. slidesToShow: 1,
  79. adaptiveHeight: true,
  80. arrows: false,
  81. draggable: true,
  82. centerMode: true,
  83. }
  84. }]
  85. });
  86. console.log('salut slick home');
  87. });
  88. $(document).ready(function(){
  89. $('.view-id-actus.view-display-id-block_1').slick({
  90. slidesToShow: 3,
  91. // slidesToScroll: 1,
  92. dots: false,
  93. arrows: true,
  94. centerMode: true,
  95. // centerPadding: '100px',
  96. responsive: [
  97. {
  98. breakpoint: 810,
  99. settings: {
  100. slidesToShow: 1,
  101. adaptiveHeight: true,
  102. arrows: false,
  103. draggable: true,
  104. centerMode: true,
  105. }
  106. }]
  107. });
  108. console.log('slick actu');
  109. });
  110. $(document).ready(function(){
  111. $('.page-node-site .node-type-site .field--name-field-image > div:nth-child(2)').slick({
  112. slidesToShow: 1,
  113. slidesToScroll: 1,
  114. dots: true,
  115. arrows: false,
  116. adaptiveHeight: true,
  117. // centerMode: true,
  118. // centerPadding: '100px',
  119. responsive: [
  120. {
  121. breakpoint: 810,
  122. settings: {
  123. slidesToShow: 1,
  124. adaptiveHeight: true,
  125. arrows: false,
  126. draggable: true,
  127. centerMode: true,
  128. }
  129. }]
  130. });
  131. console.log('slick actu');
  132. });
  133. })(jQuery, window);