So as the title suggests, I'm trying to run blur.js on my WordPress theme. I have enqueued the script in functions.php:
function load_oves_methods(){
wp_enqueue_script( 'blur', get_stylesheet_directory_uri() . '/js/blur.js', array('jquery') );
wp_enqueue_script( 'flexcroll', get_stylesheet_directory_uri() . '/js/flexcroll.js', array('jquery') );
}
add_action( 'wp_enqueue_scripts', 'load_oves_methods' );
jQuery is loaded before this. In the header.php file, I am calling the blur.js function as such:
<script>
jQuery(document).ready(function($){
jQuery(".head").blurjs({
source:'body',
radius:5,
overlay:'',
offset:{
x:0,
y:0
},
optClass:'',
cache:false,
cacheKeyPrefix:'blurjs-',
draggable:false
});
});
</script>
The script is called after wp_head();.
And the files in question are most assuredly on the server, in my themes /js folder. The error I get in the console is: "Failed to load resource: the server responded with a status of 404 (Not Found)"
Previously I was calling said script via a tag in the header, and it was able to find the file, but it kept tossing errors in blur.js, and saying that it could not find the variable "jQUery", despite jQuery UI scripts working just fine on my theme.
EDIT: Both scripts now have the array('jquery') dependency added to them, but still no dice. I have checked the file source via my browser and triple-checked all folder destinations - everything checks out as a-ok. My jQUery UI scripts work just fine, by the way, but neither blur.js or flexcroll.js work. Disabling plugins didn't have an effect, either. I checked file permissions as well, and those are set properly.