I'm trying to load a simple jQuery script into a WP footer (using an Avada child theme). I've done it before, but nothing's happening. Can anyone spot my error?
In functions.php:
add_action( 'wp_enqueue_scripts', 'wpalert' );
function wpalert() {
wp_register_script('wpalert', '--hardcoded root--', array ( 'jquery' ), null, true);
wp_enqueue_script('wpalert');
}
In my .js file:
$(document).ready(function(){
alert("test");
})