I know that there are several posts on this here, but having gone through a ton of them, I am still having problems. So - up front apologies on adding another question on something that seems so straightforward but I'm new to this and stuck!
That being said - I have soundclick.js. It lives in my theme's js folder. It works pasted straight into the header - but i need it in my functions.php file like all the other good little javascripts.
function wpana_js() {
wp_register_script('soundclick', get_template_directory_uri() . '/js/soundclick.js', array(), '0', false);
wp_enqueue_script('soundclick');
}
add_action('wp_enqueue_scripts', 'wpana_js');
Code goes in - javascript shows up in the page source, but then my calls to the javascript to get these sounds to play on a user click don't work anymore. (the calls worked just dandy when the javascript was pasted directly into the header)
Am i missing something obvious on getting the javascript back into working status? Thanks!
update i fixed the problem - apparently i was queuing correctly, but my problem lay in the js file itself. there was a basic problem with how i made the file. so it was showing up but not working. thanks all for taking a look :)