I have an html file which is correctly linked to a js file (and also the jquery library file).
<input type="button" onclick="practice();" id="intro_next_button" value="Practice"/>
Inside the js file:
$(window).load(function(){
function practice(){
alert("WORKS");
}
});
This runs if function practice is outside of the $(window).load(function(), but not when it is inside of it. There are many similar questions to this, but I have not found one that is specifically about an onclick event only not working inside of a jquery $(window).load(function().