Hey I’m a complete beginner at javascript.
I have generated codes for a model website that uses html, css and javascript with chat gpt.
I have properly linked my html code with css and javascript, but the effects that I anticipate from my javascript don’t get applied to the html code.
Can you review my code and tell me why?
https://github.com/ilwoongchoi/javascripttest
above is my github repository for my model project.
Thanks
2
Answers
Try this:
Can you give more details, maybe which behavior you are looking for ? currently it’s working , just issue is that on resizing it’s each time calling your function , so why it blinking…
For any case I think you can reach to this with css (there is meta tags in css which can allow to apply the other styles when the screen is smaller then expected)
Also in any case you have already declared the same function in the first line so you can just give the reference to the addEventListener
Also be sure every time to check browser console to exclude the errors (related to JavaScript)