I am constructing my task on Neocities called NaNarchy. It’s been buttery smooth up till this factor. I included 2 lines of code to my JS feature, ticbtn.style.pointer-events="none";
as well as ticbtn.style.cursor="default";
With these lines, no JS functions, however without them, everything jobs penalty. Right here’s my code:
allow matter = 62;
feature flicker() {
var logo design = document.getElementById(" logo design");.
logo.style.opacity="0.75";.
var x = Math.floor(( Math.random() * 250) + 100);.
setTimeout(() => > {logo.style.opacity="1.00";}, x);.
}
feature startf() {
window.setInterval( flicker, 1650);.
}
feature begins() {
document.getElementById(" shine"). style.transform="translateX( -300%)";.
window.setInterval( shine, 100);.
}
feature resets() {
matter = 62;.
document.getElementById(" shine"). style.transform="translateX( -300%)";.
}
feature shine() {
document.getElementById(" shine"). style.transform += "translateX( 8%)";.
counter();.
}
feature counter() {
matter = matter - 1;.
if (matter < < 1) {
resets();.
}
}
feature dropdown() {
ticbtn.style.opacity="1.00";.
}
feature hideticbtn() {
ticbtn.style.opacity -= "1.00";.
/ * buggy lines */.
ticbtn.style.pointer-events="none";.
ticbtn.style.cursor="default";.
}
begins();
body {
background-color: white;.
shade: black;.
font-family: Verdana;.
}
. logo design {
size: 33.3%;.
placement: outright;.
top: 0;.
left: 50%;.
change: translateX( -50%);.
}
. bodywin {
placement: loved one;.
size: 25%;.
change: convert( -140%,100%);.
left: 50%;.
top: 0;.
}
. shine {
placement: outright;.
elevation: 30%;.
left:50%;.
change: translateX( -250%);.
}
. facility {
placement: loved one;.
top: 0;.
left: 0;.
margin-left: car;.
margin-right: car;.
}
. switch {
placement: outright;.
size: 17%;.
change: convert( -134%,430%);.
left: 50%;.
top: 0;.
}
. ticbtn {
placement: outright;.
size: 17%;.
change: convert( -60%,430%);.
left: 50%;.
top: 0;.
opacity: 0.00;.
}
. bg {
placement: outright;.
change: convert( -50%, -5%);.
left: 50%;.
size: 100%;.
}
<< img src=" https://stackoverflow.com/questions/76933459/bg.png" course=" bg">
<> < img src=" nanarchy.png" course=" logo design" id=" logo design">
<> < img src=" sheen3.png" course=" shine" id=" shine">
<> < img src="/ bodywin.png" course=" bodywin">
<> < img src="/ button.png" course=" switch" onmousedown=" dropdown()">
<> < a href=" https://www.ticalc.org"><> < img src="/ ticbtn.png" course=" ticbtn" id=" ticbtn" onmouseout=" hideticbtn()"><>
To clear up, the buggy lines remain in the "hideticbtn" course in my manuscript. I have actually included a remark straight prior to them.
I have actually attempted placing the code in a various manuscript tag, in situation there was a restriction, as well as no way. I after that checked for typos, no way. I was anticipating this code to function along with the various other code, however none of it functions. I obtain tossed this mistake in the console: "Uncaught SyntaxError: Void left-hand side in task".