You are browsing as a guest. Sign up (or log in) to start making projects!

39m logged

DevLog #2 : I’m working on the logic of the js code to switch on each text without make other page but it’s difficult…

0
46

Comments 1

@Huseyin

Heyy, I gotchu.

You are using document.getElementsByClassName… Use document.querySelector instead. EXAMPLE: const Home = document.querySelector(“.Home”); You use document.getElementById… Which is great! You can use that if you would like to control the link properties later. However, you do not need to define the links for functions. the “onclick” tags inside the “li” handle that.