Skip to content

Commit 307447d

Browse files
committed
Destination Page Done
1 parent 6c77b37 commit 307447d

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

spacetourismwebsite/starter-code/assets/js/destination.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ const tabs = document.querySelectorAll('.tab'),
55
desDis = document.querySelector('.des-dis'),
66
desTime = document.querySelector('.des-time')
77
// Fetch data from JSON
8-
url = "../data.json"
8+
url = "./data.json"
99
fetch(url)
1010
.then(res => res.json())
1111
.then(
1212
data => {
1313
tabs.forEach(el => {
1414
el.addEventListener('click', () => {
1515
const tabVal = el.value
16-
console.log(tabVal)
1716
tabImg.src = `${data.destinations[tabVal].images.png}`;
1817
desHeader.innerText = data.destinations[tabVal].name
1918
desPara.innerText = data.destinations[tabVal].description
File renamed without changes.

0 commit comments

Comments
 (0)