Rechercher des vidéos
résultat 1 ? 's' : ''; ?> trouvé 1 ? 's' : ''; ?>
diff --git a/js/search.js b/js/search.js new file mode 100644 index 0000000..4aa467f --- /dev/null +++ b/js/search.js @@ -0,0 +1,12 @@ +document.addEventListener('DOMContentLoaded', function() { + // Gestion des clics sur les vidéos + const videoCards = document.querySelectorAll('.video-card'); + videoCards.forEach(card => { + card.addEventListener('click', function() { + const videoId = this.dataset.videoId; + if (videoId) { + window.location.href = 'video.php?id=' + videoId; + } + }); + }); +}); diff --git a/recherche.php b/recherche.php index 59386ba..981aecf 100644 --- a/recherche.php +++ b/recherche.php @@ -41,7 +41,7 @@ if ($resultsCount > 0) {
résultat 1 ? 's' : ''; ?> trouvé 1 ? 's' : ''; ?>