Skip to content

Commit 441a5a8

Browse files
committed
Update: Enhanced app functionalities (#196)
1 parent acb113f commit 441a5a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

MovieVerse-Frontend/js/favorites.js

+12
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,10 @@ async function loadWatchLists() {
13841384
const title = document.createElement('h3');
13851385
title.textContent = "Favorite Movies";
13861386
title.className = 'watchlist-title';
1387+
title.style.cursor = 'pointer';
1388+
title.addEventListener('click', () => {
1389+
favoritesDiv.scrollIntoView({behavior: 'smooth'});
1390+
});
13871391

13881392
const description = document.createElement('p');
13891393
description.textContent = "A collection of your favorite movies.";
@@ -1419,6 +1423,10 @@ async function loadWatchLists() {
14191423
const title = document.createElement('h3');
14201424
title.textContent = "Favorite TV Series";
14211425
title.className = 'watchlist-title';
1426+
title.style.cursor = 'pointer';
1427+
title.addEventListener('click', () => {
1428+
favoritesDiv.scrollIntoView({behavior: 'smooth'});
1429+
});
14221430

14231431
const description = document.createElement('p');
14241432
description.textContent = "A collection of your favorite TV series.";
@@ -1762,6 +1770,10 @@ function createWatchListDiv(watchlist) {
17621770
const title = document.createElement('h3');
17631771
title.textContent = watchlist.name;
17641772
title.className = 'watchlist-title';
1773+
title.style.cursor = 'pointer';
1774+
title.addEventListener('click', () => {
1775+
watchlistDiv.scrollIntoView({ behavior: 'smooth' })
1776+
});
17651777

17661778
const description = document.createElement('p');
17671779
description.textContent = watchlist.description;

0 commit comments

Comments
 (0)