Catalogue de cours
// Wait for the DOM content to be fully loaded document.addEventListener(“DOMContentLoaded”, function() { // Part 1: Add date to each course var courses = document.querySelectorAll(‘.sfwd-courses’); courses.forEach(function(course) { var dateElement = document.createElement(‘div’); dateElement.className = ‘course-date’; dateElement.textContent = ‘April 4, 2024’; // Replace with your desired date course.appendChild(dateElement); }); // Part 3: Update all divs with class ‘btn-primary’ to say “Enter study” var primaryBtns = document.querySelectorAll(‘.btn-primary’); primaryBtns.forEach(function(btn) { console.log(“1”); btn.textContent = “Enter study”; }); }); /* Define your CSS styles here */ .course-date { text-align: center; color: #888888; /* Light grey color */ }