0
a1 is not a function?
i made this code for the knight challenge <!DOCTYPEhtml> <html> <head> <script src="https://code.jquery.com/jquery-3.1.1.js"></script> </head> <body> <table id="schaakbord"> <tr> <td onclick="h1()" id="h1"></td> </tr> </table> <script> function h1(){ $("#h1").css("background-color","#ab1234"); } </script> </body> </html> but when i click on h1 it errors h1 is not a function
5 Answers
+ 2
Nothing wrong with the posted code; maybe you have something wrong with your actual code.
+ 2
It works for me...
0
i just litterally copy-pasted itâș
0
wait ill send you the complete code
0
saw the mistake....
function start(){
//lot of actions
if(){
//if action
}
else{
//action
}
function h1(){
//action
}
see the mistake too? i missed a curly bracket to close the start function