Ask coding questions

← Back to all posts
javascript file not running?
EthanBlesch (8)

I have a game that I'm trying to add online high scores to, but the script.js file is not running, anyone know why?

Comments
hotnewtop
TheBest156 (43)

I see what you are dealing with, It is also good practice to wrap any code that requires jQuery in a game.

jQuery(document).ready(function($) { // Clock script here });

TheBest156 (43)

@EthanBlesch Did I do something wrong?

EthanBlesch (8)

@TheBest156 no, i just don't know what you mean

TheBest156 (43)

@EthanBlesch So the js part of this scenario is the part making the game platform? (what the game is in.)

EthanBlesch (8)

@TheBest156 yes, script js is the game, index.html is the canvas, index.js handles the database