Compare commits
No commits in common. "main" and "recherche" have entirely different histories.
@ -12,13 +12,11 @@ function remplissage(EPISODES) {
|
||||
<section class="resultat accordeon_item">
|
||||
<h1 class="accordeon_item_header">${EPISODES.results[index].title}</h1>
|
||||
<div class="accordeon_item_body">
|
||||
<div class="column1">
|
||||
<p class= "episode">Episode : ${EPISODES.results[index].episode_id}</p>
|
||||
<p class= "directeur">Directeur : ${EPISODES.results[index].director}</p>
|
||||
<p class= "producteur">Producteur : ${EPISODES.results[index].producer}</p>
|
||||
<p class= "sortie">Date de Sortie : ${EPISODES.results[index].release_date}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>`
|
||||
}
|
||||
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||
|
@ -86,16 +86,9 @@ function remplissage(json) {
|
||||
</div>
|
||||
</section>`;
|
||||
|
||||
}
|
||||
|
||||
//Pagination
|
||||
createPagination(previousUrl, nextUrl, PERSONNAGES, remplissage);
|
||||
|
||||
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||
accordeonItemHeader.forEach(accordeonItemHeader => {
|
||||
accordeonItemHeader.addEventListener("click", event => {
|
||||
accordeonItemHeader.classList.toggle("active");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
api_call(API_URL + "/people", remplissage);
|
||||
|
@ -42,12 +42,12 @@ function remplissage(results) {
|
||||
createPagination(previousUrl, nextUrl, planetes, remplissage);
|
||||
|
||||
const accordeonItemHeader = document.querySelectorAll(".accordeon_item_header");
|
||||
accordeonItemHeader.forEach(accordeonItemHeader => {
|
||||
accordeonItemHeader.addEventListener("click", event => {
|
||||
accordeonItemHeader.classList.toggle("active");
|
||||
});
|
||||
for (item of accordeonItemHeader) {
|
||||
item.addEventListener("click", (event) => {
|
||||
item.classList.toggle("active");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
api_call(API_URL + "/planets", remplissage);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user