Or is it registered by default?
I am enqueuing a script with wp_enqueue_script()
wp_enqueue_script('validation', 'http://domain.com/wordpress/wp-content/themes/theme/js/validation.js', array('jquery'));
But I get this error in the console:
Uncaught TypeError: Property '$' of object [object Object] is not a function
Also do I need to put the absolute path to link my js, or can I use a relative path? Relative to what?
You don’t need to register it but in your own js file, replace the first
$
tojQuery
.jQuery is loaded in No Conflict Mode
And if you use anonymous functions, do it like this
Also, you need to use relative paths.