wp_register_script() registers a script to be enqueued later using the wp_enqueue_script() function. Use wp_enqueue_script('add-bx-js') to load registered script. This means, if you want to register your scripts, but not directly load them in your pages, you can register the files once, and then load them when you need them.
Use the following code :
function james_adds_to_the_head() {
wp_register_script( 'add-bx-js', plugin_dir_url( __FILE__ ) . 'js/filter-oglasi.js', array('jquery'),'',true );
wp_enqueue_script( 'add-bx-js' );
}
add_action( 'wp_enqueue_scripts', 'james_adds_to_the_head' );
or :
function james_adds_to_the_head() {
wp_enqueue_script( 'add-bx-js', plugin_dir_url( __FILE__ ) . 'js/filter-oglasi.js', array('jquery'),'',true );
}
add_action( 'wp_enqueue_scripts', 'james_adds_to_the_head' );
more info :
https://wordpress.stackexchange.com/questions/82490/when-should-i-use-wp-register-script-with-wp-enqueue-script-vs-just-wp-enque
https://developer.wordpress.org/reference/functions/wp_register_script/
Update
You have error in your js file. Use jQuery instead of jquery as follow and then use CTRL+F5 to force refresh browser cache. Also you can use wp_register_script() fourth parameter - version parameter - to force refresh assets.
jQuery(document).ready(function() {
console.log("MAIN IS LOADED");
alert("Dragi");
});