setTimeout(function(){ function handleDossier(dossier) { $('.row.one-bottom-line .col-md-4.col-lg-3:not(.d-none)').remove(); $('.row.one-bottom-line .col-md-8.col-lg-6').addClass('col-lg-9').removeClass('col-lg-6'); html = `

Tous les articles du dossier

 
`; $('.entete-dossier').html(html); $('.content-here').html(dossier.translations.fr_FR.body); i = 0; $('.all-articles').html(''); dossier.articles.forEach(function(article){ category = article.category.translations.fr_FR.slug; html = `
`; $('.all-articles').append(html); i++; }); } $.ajax({ type: 'GET', dataType: 'json', url: 'https://api.equidia.fr/api/public/dossiers', success: function(dossiers) { console.warn('success', dossiers); url = location.href.split('/'); slug = url[url.length - 1]; dossiers.forEach(function(dossier){ if (dossier.slug == slug) { handleDossier(dossier); } }); }, error: function(data) { console.warn('error', data); }, headers: { 'x-http-referer': location.origin } }); setTimeout(function(){ document.getElementsByTagName('block-nav')[0].classList.add('fix-css-two-columns'); $( window ).scroll(function() { document.getElementsByTagName('block-nav')[0].classList.add('fix-css-two-columns'); }); }, 500); }, 500);