I am trying to modify a plugin and am adding Jquery, but it does not seem to be executing

You need to capitalize the Q of jQuery in your code. The current code will likely throw an error like

Uncaught ReferenceError: jquery is not defined

Your code also has one to many }); which will likely trigger

Uncaught SyntaxError: Unexpected token }

Don’t forget to check the javascript console in your browser’s developer tools, this is where such error will appear and give you helpful information about what went wrong.

This will work:

<script type="text/javascript">
    jQuery('#update').click( function() { alert('clicked'); });
</script>

…as long as jQuery is loaded and available on your page.

If jQuery is loaded in the footer, your inline code won’t work because jQuery won’t be available yet when it tries to run.
Possible solutions would be:

  • Make jQuery load from the header instead.
  • Make your code load in the footer after jQuery itself, instead of inlining it.

If jQuery is not loaded at all on your site, you’ll need to add it.
jQuery is bundled with WordPress and already registered by default in WordPress, so you would just need to enqueue it with this function (in your plugin or theme’s functions.php file):

/**
 * Enqueues jQuery on the front-end.
 */
function my_enqueue_jquery() {
    wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_jquery' );