Errors are basically of inattention.
Some problems in the code:
You added # to the id in Chapter and Typoex. At the time of calling the object, it would obviously not locate.
Still in Chapter, you didn’t use accent, but you selected the object as if you had put.
You tried to locate $('#typeEx') with tiny t, which also won’t work.
The object you see on the return, when executing a select jQuery for Chapter and Typoex indicate that it was not located, only.
Normalize as below and everything will work well.
<select id='Capítulo' size='3' disabled>
<option>Capitulo 1</option>
<option>Capitulo 2</option>
<option>Capitulo 3</option>
</select>
<select id='TipoEx' size='3' disabled>
<option>Revisando</option>
<option>Propostos</option>
<option>Complementares</option>
</select>
$('#Capítulo').click(function() {
capitulo = $(this).find(':selected').text();
$('#navigation a.capitulo').text(capitulo);
if (capitulo != '') {
$('#navigation a:eq(3)').addClass('active');
$('#TipoEx').prop('disabled', false);
}
});
$('#TipoEx').click(function() {
tipoEx = $(this).find(':selected').text();
$('#navigation a.tipoEx').text(tipoEx);
if (capitulo != '') {
$('#Exercícios').show();
}
});
});
I have the slight impression that it is because of the accentuation, as it is not advisable
– 13dev
I thought it might be the accent and tested without, but I got the same result.
– Felipe Henrique Cardoso