13 lines
411 B
JavaScript
13 lines
411 B
JavaScript
|
|
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;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|