This repository has been archived on 2023-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
meritkollen/html/assets/js/changeall.js
2019-09-25 19:12:15 +02:00

30 lines
716 B
JavaScript

$('.changeall').on('click', function(){
var grade;
var val;
if (document.getElementById('option-1').checked) {
grade = "A";
val = 20;
} else if (document.getElementById('option-2').checked) {
grade = "B";
val = 17.5;
} else if (document.getElementById('option-3').checked) {
grade = "C";
val = 15;
} else if (document.getElementById('option-4').checked) {
grade = "D";
val = 12.5;
} else if (document.getElementById('option-5').checked) {
grade = "E";
val = 10;
} else if (document.getElementById('option-6').checked) {
grade = "F";
val = 0;
}
$('form.kurser').find('div').each(function(){
$('.select-dropdown').val(grade);
$('.grade').val(val);
});
raknaUtMeritvarde();
});