JavaScript in Wordpress for nav buttons


I have a fair amount of PHP but limited JavaScript programming experience. I need some advice on the correct approach for my issue - I've already read all of the developer articles and tutorials but can't seem to figure out exactly how to approach this.

I am running the branched scenario in Wordpress and do not want users to be able to proceed past a fill in the blank question on a course presentation slide without answering the question. My strategy is to hide the "proceed" button until the question has been answered correctly by including some jQuery:

(function($) {
})( jQuery );


I would then add some arguments to hide/show the button based on whether the answer field was populated.

How do I start though? Do I need to use external dispatcher or dom change to get the code to match up to the h5p elements? Do I need to to create a new library for this, or can it be done in the page?  All help is very appreciated... thanks.