I have a timer script which I have loaded into Wordpress using the following method in functions.php
function timer_scripts_method() {
wp_enqueue_script(
'custom-script',
get_template_directory_uri() . '/quiz/js/timer.js',
array( 'jquery' )
);
}
add_action( 'wp_enqueue_scripts', 'timer_scripts_method' );
The script itself starts and end with the following lines
(function () { [...] }).call(this);
I have attempted the following to get this working:
(function ($) { [...] }).call(this);
(function () { [...] }).call(this)(jQuery);
jQuery.noConflict(); (function () { [...] }).call(this);
jQuery.noConflict(); (function () { [...] }).call(this)(jQuery);
The full JS code cane be found here (beautified) http://pastebin.com/X7py7ecb
And the console error I am getting is
Uncaught Error: [jQuery-runner] jQuery library is required for this plugin to work
I can also confirm that other JS libraries that have a dependancy on jQuery have loaded in fine.
Not being great at JS I feel like this is something really obvious, that I am missing.