Changed around line 1
+ const videoGrid = document.getElementById('video-grid');
+ const regionSelector = document.getElementById('region');
+
+ // Sample video data (would be replaced with actual API calls)
+ const videos = {
+ global: [
+ {
+ thumbnail: 'images/global1.jpg',
+ title: 'Global Dance Challenge',
+ description: 'The latest global sensation'
+ },
+ // Add more videos...
+ ],
+ 'north-america': [
+ {
+ thumbnail: 'images/na1.jpg',
+ title: 'North American Trend',
+ description: 'Taking over the USA and Canada'
+ },
+ // Add more videos...
+ ],
+ // Add more regions...
+ };
+
+ function createVideoCard(video) {
+ const card = document.createElement('div');
+ card.className = 'video-card';
+
+ const img = document.createElement('img');
+ img.src = video.thumbnail;
+ img.alt = video.title;
+
+ const info = document.createElement('div');
+ info.className = 'video-info';
+
+ const title = document.createElement('h3');
+ title.textContent = video.title;
+
+ const description = document.createElement('p');
+ description.textContent = video.description;
+
+ info.appendChild(title);
+ info.appendChild(description);
+
+ card.appendChild(img);
+ card.appendChild(info);
+
+ return card;
+ }
+
+ function updateVideos(region) {
+ videoGrid.innerHTML = '';
+ const regionVideos = videos[region] || [];
+ regionVideos.forEach(video => {
+ videoGrid.appendChild(createVideoCard(video));
+ });
+ }
+
+ regionSelector.addEventListener('change', (e) => {
+ updateVideos(e.target.value);
+ });
+
+ // Initial load
+ updateVideos('global');