0

Need help in debugging my JS code

The object ( fading touch effect ) is spawning below the point of touch but if I remove all the text from the body it works well ... To remove a text just click on it... Like Click on my name to remove it and the object will spawn at correct position .... See the code and help me plz,, https://code.sololearn.com/Wu28QnV2gzZF/?ref=app

28th Feb 2021, 5:50 PM
Abhay
Abhay - avatar
4 Antworten
+ 2
you must add left:0; and top:0; to #dot css rules... also, I would replace clientX/Y by pageX/Y (support of scrolling) ;)
28th Feb 2021, 6:11 PM
visph
visph - avatar
+ 1
you could also give your #viewport element a full viewport height, by giving all ancestor 100% height: html, body, #viewport { height:100%; } or simply by giving height:100vh; to #viewport ^^
1st Mar 2021, 4:10 AM
visph
visph - avatar
+ 1
Send me an Code z Ex to explain well visph plzzzz
2nd Mar 2021, 7:37 AM
Abhay
Abhay - avatar