1jQuery(document).ready(function ($) { 2 if (!is_mobile) { 3 is_mobile = window.innerWidth <= 768; 4 } 5 6 const blocSwiper = $('.docti__o-swiper'); 7 if (blocSwiper.length != 0) { 8 if (typeof Swiper !== "undefined") { 9 const carouselPosts = new Swiper('.docti__o-swiper', { 10 slidesPerView: 1.4, 11 spaceBetween: 24, 12 navigation: { 13 nextEl: '.docti__o-swiper--next', 14 prevEl: '.docti__o-swiper--prev', 15 }, 16 breakpoints: { 17 // when window width is >= 768px 18 768: { 19 slidesPerView: blocSwiper.data("slidesperview") ?? 3.5, 20 spaceBetween: 20, 21 } 22 }, 23 on: { 24 init: function(swiper) { 25 if (typeof rw_lazyload !== 'undefined') { 26 rw_lazyload(); 27 } 28 updateNavigation(swiper); 29 }, 30 resize: updateNavigation, 31 update: updateNavigation, 32 }, 33 }); 34 35 function updateNavigation(swiper) { 36 const hide = swiper.isLocked; 37 38 const nextEl = Array.isArray(swiper.navigation.nextEl) 39 ? swiper.navigation.nextEl[0] 40 : swiper.navigation.nextEl; 41 42 const prevEl = Array.isArray(swiper.navigation.prevEl) 43 ? swiper.navigation.prevEl[0] 44 : swiper.navigation.prevEl; 45 46 nextEl?.classList.toggle('hidden', hide); 47 prevEl?.classList.toggle('hidden', hide); 48 } 49 } 50 } 51 const blocParolesDePatient = $('.docti__o-swiper-paroles-de-patient'); 52 if (blocParolesDePatient.length !== 0 && typeof Swiper !== "undefined") { 53 const carouselParolesDePatient = new Swiper('.docti__o-swiper-paroles-de-patient', { 54 slidesPerView: 1.5, 55 spaceBetween: 21, 56 navigation: { 57 nextEl: '.docti__o-swiper-paroles-de-patient--next', 58 prevEl: '.docti__o-swiper-paroles-de-patient--prev', 59 }, 60 breakpoints: { 61 // when window width is >= 768px 62 768: { 63 slidesPerView: 3, 64 } 65 } 66 }); 67 } 68 69 const archiveArticleSwiper = $('.archive-articles__swiper '); 70 if (archiveArticleSwiper.length != 0) { 71 if (typeof Swiper !== "undefined") { 72 const carouselArchiveArticles = new Swiper('.archive-articles__swiper', { 73 slidesPerView: "auto", 74 spaceBetween: 24, 75 navigation: { 76 nextEl: '.docti__o-swiper-archive--next', 77 prevEl: '.docti__o-swiper-archive--prev', 78 }, 79 breakpoints: { 80 // when window width is >= 768px 81 768: { 82 slidesPerView: 2.3, 83 } 84 }, 85 on: { 86 init: function() { 87 if (typeof rw_lazyload !== 'undefined') { 88 rw_lazyload(); 89 } 90 }, 91 }, 92 }); 93 } 94 } 95 96 // Menu Swiper 97 const menuSwiper = $('.docti__menu-swiper'); 98 if (menuSwiper.length != 0) { 99 if (typeof Swiper !== "undefined") { 100 const menuSwiperCrsl = new Swiper('.docti__menu-swiper', { 101 slidesPerView: 'auto', 102 spaceBetween: 30, 103 breakpoints: { 104 // when window width is >= 1024 105 1024: { 106 slidesPerView: 8, 107 } 108 } 109 }) 110 } 111 } 112 113 // Menu en ce moment Swiper 114 const menuEnCeMomentSwiper = $('.docti__en-ce-moment--items'); 115 if (menuEnCeMomentSwiper.length) { 116 if (typeof Swiper !== "undefined") { 117 const menuEnCeMomentSwiperCrsl = new Swiper('.docti__en-ce-moment--items', { 118 slidesPerView: 3, 119 spaceBetween: 30, 120 navigation: { 121 nextEl: '.docti__en-ce-moment--next', 122 prevEl: '.docti__en-ce-moment--prev', 123 }, 124 breakpoints: { 125 // when window width is >= 768px 126 768: { 127 slidesPerView: 'auto', 128 } 129 } 130 131 }); 132 133 } 134 } 135 136 // Medicaments simulaires Swiper 137 const medicamentsSimulairesSwiper = $('.medicaments_similaires--swiper'); 138 if (medicamentsSimulairesSwiper.length != 0) { 139 if (typeof Swiper !== "undefined") { 140 const medicamentsSimulairesSwiperCrsl = new Swiper('.medicaments_similaires--swiper', { 141 slidesPerView: 'auto', 142 spaceBetween: 30, 143 navigation: { 144 nextEl: '.medicaments_similaires--swiper-next', 145 prevEl: '.medicaments_similaires--swiper-prev', 146 }, 147 }); 148 149 } 150 } 151 152 const redacSwiper = $('.bloc_redac--swiper'); 153 if (redacSwiper.length != 0) { 154 if (typeof Swiper !== "undefined") { 155 const carouselRedacteurs = new Swiper('.bloc_redac--swiper', { 156 slidesPerView: 2.5, 157 spaceBetween: 16, 158 breakpoints: { 159 // when window width is >= 768px 160 768: { 161 slidesPerView: 4, 162 spaceBetween: 20, 163 } 164 } 165 }) 166 } 167 } 168 169 const nosOutilsSwiper = $('.docti__nos__outils--swiper'); 170 if (nosOutilsSwiper.length != 0) { 171 if (typeof Swiper !== "undefined") { 172 const carouselNosOutils = new Swiper('.docti__nos__outils--swiper', { 173 slidesPerView: 2, 174 spaceBetween: 10, 175 navigation: { 176 nextEl: '.docti__o-swiper-nos__outils--next', 177 prevEl: '.docti__o-swiper-nos__outils--prev', 178 }, 179 breakpoints: { 180 // when window width is >= 320px 181 320: { 182 grid: { 183 rows: 2, 184 } 185 }, 186 187 // when window width is >= 768px 188 768: { 189 slidesPerView: 4, 190 spaceBetween: 16, 191 } 192 } 193 }); 194 } 195 } 196 197 198 const nosCommunautesSwiper = $('.docti__nos_communautes--swiper'); 199 if (nosCommunautesSwiper.length != 0) { 200 if (typeof Swiper !== "undefined") { 201 const carouselnosCommunautes = new Swiper('.docti__nos_communautes--swiper', { 202 slidesPerView: 'auto', 203 spaceBetween: 20, 204 breakpoints: { 205 // when window width is >= 768px 206 768: { 207 navigation: { 208 nextEl: '.docti__o-swiper-nos_communautes--next', 209 prevEl: '.docti__o-swiper-nos_communautes--prev', 210 }, 211 } 212 } 213 }); 214 } 215 } 216 const sousCatTop = $('.docti__sous_cat_top--swiper'); 217 if (sousCatTop.length != 0) { 218 if (typeof Swiper !== "undefined") { 219 const carouselSousCatTop = new Swiper('.docti__sous_cat_top--swiper', { 220 slidesPerView: 'auto', 221 spaceBetween: 16, 222 breakpoints: { 223 768: { 224 spaceBetween: 20, 225 navigation: { 226 nextEl: '.docti__sous_cat_top--swiper-btns-next', 227 prevEl: '.docti__sous_cat_top--swiper-btns-prev', 228 }, 229 }, 230 231 }, 232 on: { 233 init: function () { 234 // Find the active badge 235 const activeBadgeIndex = $('.badge--active').index(); 236 // Activate the item before the active badge 237 if (activeBadgeIndex > 0) { 238 this.slideTo(activeBadgeIndex - 1); 239 } 240 } 241 } 242 }); 243 } 244 } 245 246 const topThreePosts = $('.docti__top__three__posts--swiper'); 247 if (topThreePosts.length != 0) { 248 if (typeof Swiper !== "undefined") { 249 const carouselTopThreePosts = new Swiper('.docti__top__three__posts--swiper', { 250 slidesPerView: 'auto', 251 breakpoints: { 252 768: { 253 enabled: false, 254 slidesPerView: 'auto', 255 } 256 } 257 }); 258 } 259 } 260 261 $('.docti-top-header__search-icon, .docti-top-header__search--close').on('click', function () { 262 $('.docti-top-header__search').toggleClass('show-search'); 263 }); 264 265 $('.medicines__description--show-more').on('click', function () { 266 $(this).addClass('hide-btn'); 267 $('.medicines__description--more').addClass('show-text'); 268 }); 269 270 $('.advanced-search--banner-title').on('click', function (e) { 271 $(this).closest('.advanced-search--banner').find('.letters-list').toggleClass('hidden'); 272 }); 273 274 $('.docti__collapse-head').on('click', function (e) { 275 let panel = $(this).parent('.docti__collapse'); 276 let panelContent = panel.find('.docti__collapse-content'); 277 278 panelContent.slideToggle(); 279 panel.toggleClass('collapse-open'); 280 }); 281 282 $('.toggle-modal').on('click', function (e) { 283 let teleconsultationModal = $('#doc-modal-promote-consent'); 284 teleconsultationModal.toggleClass('closed'); 285 }); 286 287 $('.diapo_vertical_item .share').on('click', function (e) { 288 let blockShare = $(this).parent('.blockShare_horizontal');
289 blockShare.toggleClass('open-share'); 290 }); 291 292 const $_diapo_vertical_item = $('.diapo_vertical_item'); 293 if ($_diapo_vertical_item.length != 0) { 294 $(window).on('scroll', function () { 295 // Get current scroll position 296 var scrollPos = $(this).scrollTop(); 297 $_diapo_vertical_item.each(function () { 298 const $_diapo_item = $(this); 299 var top = $_diapo_item.offset().top; 300 var bottom = top + $_diapo_item.outerHeight(); 301 302 // Check if the current div is in the viewport 303 if (scrollPos >= top && scrollPos <= bottom) { 304 var id = $_diapo_item.attr('id'); 305 306 // Update the URL with the ID 307 history.replaceState(null, null, '#' + id); 308 309 return false; 310 } 311 }); 312 }); 313 } 314 315 const slidTags = $('.docti__sub_cats'); 316 if (slidTags.length != 0) { 317 if (typeof Swiper !== "undefined") { 318 const carouselTags = new Swiper('.docti__sub_cats', { 319 slidesPerView: 'auto', 320 }); 321 } 322 } 323 324 if(is_mobile) { 325 const slidBreadcrumb = $('.breadcrumb__wrapper'); 326 if (slidBreadcrumb.length != 0) { 327 slidBreadcrumb.find('.breadcrumb').addClass('swiper-wrapper').find('li').addClass('swiper-slide'); 328 if (typeof Swiper !== "undefined") { 329 const carouselBreadcrumb = new Swiper('.breadcrumb__wrapper', { 330 slidesPerView: 'auto', 331 spaceBetween: 8, 332 }); 333 } 334 } 335 } 336});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.