Hi Everyone,
I found 100s of different ways to do it... But I just can't get my head around it... I just cannot find anything clear on how to do it... And whatever I try it just doesn't work.
I tried to read the codex... and the developer handbook... and many other other... website... and even more than that... I just cannot make jQuery work...
Does ANYONE has a clear guide on how to do it... Or an example I could include in my file to understand how this thing work?
For example I did the following:
function easyreg_load_jquery(){
wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'easyreg_load_jquery');
Load the jQuery and then run it with the hook for wp_enqueue_scripts.
Once this is done, from what I read everywhere I should be able to use a jQuery script inside my plugin (directly not even in a .JS file).
jQuery(document).ready(function(){
/do something
});
But "jquery is not recognised"...
I tried to link to a JS script... but it doesn't seem to be loaded... Which is why I would need a script to give me a PROPER working example.
I am not pointing to any other jQuery in my plugin, it's the only time I'm calling it...
I just need a simple script to disable some fields in my Admin section of my plugin I cannot believe it is so complicated... I'm sure I'm just missing a little something