I am trying to use a self written script for the jQuery library in my self-made theme, but it's not working. When I simply use script-tags, everything is alright. So it has to be something with wp_enqueue_script and wp_register_script. In the beginning of my code in the index.php I have
<?php wp_enqueue_script('jquery'); wp_register_script( 'my_name', 'path/to/my/script/script.js')); wp_enqueue_script('my_name'); ?>
I know that normally that has to be written BEFORE wp_head(); but because I am still developing everything, I haven't split my code into various files, I am working straight in the index.php. Do I have to do any other steps before enqueueing the scripts?