javascript not being enqueued correctly

I think you have typo in your code: ors_enqueue_scripts should be wp_enqueue_scripts add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ ); function enqueue_parent_theme_style() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ ); wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri().’/style.css’ ); wp_enqueue_script(‘ors-animations’, get_stylesheet_directory_uri().’/javascripts/animations.js’, array( ‘jquery’ )); }

Why should I deregister jquery?

Linking jquery code twice conflicts the functions as they are present twice. So deregistering helps you but it is not good choice. You should go through jQuery no conflict thing. And you should register your jquery version with different name, so that it does not break wordpress. Ref- jQuery Forum and Documentation

Should I use get_bloginfo(‘stylesheet_directory’) or get_stylesheet_directory_uri() when enqueueing my js files?

Starting from WordPress 4.7, I would use get_theme_file_uri(), so any child theme can override the file easily: if the file exists in the child theme, get_theme_file_uri() returns the URI to that file, otherwise returns the file in the parent theme: wp_enqueue_script( ‘localScroll’, get_theme_file_uri( ‘js/jquery.localScroll.min.js’ ), array( ‘scrollTo’ ), ‘1.2.8b’, true ); If you want to … Read more

WordPress add script with custom type (x-jquery-tmpl)

Printing the script in the head is a method called do_item in the wp_script class. In this method you see this line: $tag = “{$cond_before}{$before_handle}<script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/262406/$src”></script>\n{$after_handle}{$cond_after}”; So, the script type is hardwired in the function. However, a few lines further on, you see this: $tag = apply_filters( ‘script_loader_tag’, $tag, $handle, $src ); This allows … Read more