jquery – Running a script through the 'name' attribute doesn't work
Question: Follow the code: <select class=”form-control” name=”dd_medidaAplicada” id=”dd_medidaAplicada”> <option value=”0″></option> <option value=”cancelada”>Advertência Cancelada</option> <option value=”escrita”>Advertência Escrita</option> <option value=”verbal”>Advertência Verbal</option> <option value=”dispensa”>Dispensa por Justa Causa</option> <option value=”suspensao”>Suspensão</option> I want to run a script every time selected item is changed: $(“input[name=dd_medidaAplicada]”).on(‘change’, function() { alert( this.value );}) However, through the name attribute I …
jquery – Running a script through the 'name' attribute doesn't work Read More »