I'm following a tutorial to do an AJAX function that detects the change in a <select>
to load the information into another <select>
. I did the same thing on the video, but mine is not working.
<script type="text/javascript">
$(document).ready(function() {
$('#aluno_naturalidade_uf').on('change', function(){
alert('Funcionou!');
});
});
</script>
I have already put a breakpoint in the $(document)
line, but clicking to pass the line it jumps straight to </script>
. Imports of the scripts from this template I'm using are as follows:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script><scriptsrc="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
Thevideoisthis: link The code is ready by 12:550.
Edit: After skipping to the </script>
line this information appears in scope: