Why does the $(‘#select_embed’) property get set to true, but not to false? Instead, I tried removeAttribute(‘required’), but that didn’t work either.
<script>
function showBundles(){
if (document.getElementById("embed").checked){
$('#div_embed_bundles').show('fast')
$('#select_embed').prop('required',true);
}
else {
$('#div_embed_bundles').hide('fast')
$('#select_embed').prop('required',false);
}
}
</script>
Ideally if
prop('required',true)is working thenprop('required',false)should also work. But you can try withremoveAttr, hope this helps.