Why doesn't this script work?

I want to set required and not required in a inputbox in a form via a radio button, but it does not work.
I tested it outside of webflow and it worked.

   	$("#zonder partner").click(function() {
$("#Voornaam-RSVP-Partner").prop("required", false);
$("#Familienaam-RSVP-Partner").prop("required", false);
$("#met partner").click(function() {
$("#Voornaam-RSVP-Partner").prop("required", true);
$("#Familienaam-RSVP-Partner").prop("required", true)
})

});


Here is my public share link: LINK
(how to access public share link)

#zonder partner doesn’t seem to be a correct selector, as there is a space between the words.

By mistake I sent the wrong code, indeed it should be #zonder-partner, but that is not the problem.
This is the used code:

$(“#zonder-partner”).click(function() {
$(“#Voornaam-RSVP-Partner”).prop(“required”, false);
$(“#Familienaam-RSVP-Partner”).prop(“required”, false);
$(“#met-partner”).click(function() {
$(“#Voornaam-RSVP-Partner”).prop(“required”, true);
$(“#Familienaam-RSVP-Partner”).prop(“required”, true)
})
});

Without a link to the published page, there is no way we can debug this for you.

Have you tried seeing if there are any errors in the console?

Helas I can not give a link to the page.
There is no error in the console. Only when I put th code into the code editor in webflow it shows true and false in red.

webflow