How can I clean up my JS on this?
Brannon
@ekkas303All comments
- @ChaffexdSubmitted about 2 years ago@ekkas303Posted about 2 years ago
hey bro just want to ask how did you connect json file to javascript because i did paste this: fetch("/data.json") .then((response) => { return response.json(); }) this is what i got : File "c:\Users\5750G\Desktop\time-tracking-dashboard-main\index.js", line 6 .then((response) => { ^ SyntaxError: invalid syntax PS C:\Users\5750G.vscode> Any idea why its not working?
0 - @ekkas303Submitted about 2 years ago
I tried using switch function in javascript to make my code cleaner but somehow i couldn't get the hang of it. So instead i had to hard-code it but I'm sure there is a much better way to avoid many lines. Also during javascript manipulation i wanted to have a transition delay but i couldn't find a way, if there is a way to do this please help out.
@ekkas303Posted about 2 years agoAfter watching others solutions i think i might have misread the instructions and just built based on image display. But i still would like to know if there is a way to add transition delay during javascript background manipulation..............................................................................................................................................................
0 - @ky302Submitted about 2 years ago
I still don't understand about how to make a navbar on a mobile display with a blurry background, if you have any suggestions please let me know
@ekkas303Posted about 2 years agoI had the same problem but i found a simple solution by making a div below the body and setting the height and width to 100%. I made sure to set the position of the body to relative and also the div position to absolute . I made the div black and played around with the transparency until i was satisfied. This was my way of solving it but i think there are much better ways to do it.
Marked as helpful0 - @ReddsitoSubmitted about 2 years ago
Hello! the truth is that it took me a long time to make this project, it was a real challenge for me, and you can see it in my many lines of code in css haha, a question, is it normal that it has taken me so many lines of code in css to make the whole style, or I just have a very bad practice in css? Any advice or criticism is welcome :D
@ekkas303Posted about 2 years agoHey bro just want to inform you that the link to your project is different from the challenge, I might be wrong be do recheck. .........................................................................................................................................
0