ранжирование по степени важности

111
23 января 2021, 18:10

есть пять вопросов, в каждом из них пять оценок, от одного до пяти. как реализовать что бы по выборе в первом вопросе допустим 1,что бы данная оценка отсутствовала во втором вопросе, и было уже от двух до пяти, и так со всеми вариантами. реализовать нужно на html jquery, is

$("input:checkbox").on('click', function() { 
  // in the handler, 'this' refers to the box clicked on 
  var $box = $(this); 
  if ($box.is(":checked")) { 
    // the name of the box is retrieved using the .attr() method 
    // as it is assumed and expected to be immutable 
    var group = "input:checkbox[name='" + $box.attr("name") + "']"; 
    //console.log($(this).val()); 
 
    // the checked state of the group/box on the other hand will change 
    // and the current value is retrieved using .prop() method 
    $(group).prop("checked", false); 
    $box.prop("checked", true); 
 
 
 
    if ($(this).val() == 1) { 
 
      $(".one").prop("disabled", "disabled"); 
 
      $(this).prop("disabled", false); 
      //$("#radio-previous").val($(this).val()); 
 
 
 
    } 
    if ($(this).val() == 2) { 
 
      $(".two").prop("disabled", "disabled"); 
      $(this).prop("disabled", false); 
      //$("#radio-previous").val($(this).val()); 
    } 
    if ($(this).val() == 3) { 
      $(".three").prop("disabled", "disabled"); 
      $(this).prop("disabled", false); 
      $("#radio-previous").val($(this).val()); 
    } 
    if ($(this).val() == 4) { 
      $(".four").prop("disabled", "disabled"); 
      $(this).prop("disabled", false); 
      $("#radio-previous").val($(this).val()); 
    } 
    if ($(this).val() == 5) { 
      $(".five").prop("disabled", "disabled"); 
      $(this).prop("disabled", false); 
      $("#radio-previous").val($(this).val()); 
    } 
 
 
 
 
 
 
  } else { 
    $box.prop("checked", false); 
 
    if ($(this).val() == 1) { 
      $(".one").prop("disabled", false); 
      //$(this).prop("disabled",false); 
    } 
    if ($(this).val() == 2) { 
      $(".two").prop("disabled", false); 
      //$(this).prop("disabled",false); 
    } 
    if ($(this).val() == 3) { 
      $(".three").prop("disabled", false); 
      //$(this).prop("disabled",false); 
    } 
    if ($(this).val() == 4) { 
      $(".four").prop("disabled", false); 
      //$(this).prop("disabled",false); 
    } 
    if ($(this).val() == 5) { 
      $(".five").prop("disabled", false); 
      //$(this).prop("disabled",false); 
    } 
 
 
  } 
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> 
<div> 
  <h3>Fruits</h3> 
  <label> 
        <input class="one" type="checkbox" class="radio" value="1" name="fooby[1][]" />Kiwi</label> 
  <label> 
        <input class="two" type="checkbox" class="radio" value="2" name="fooby[1][]" />Jackfruit</label> 
  <label> 
        <input class="three" type="checkbox" class="radio" value="3" name="fooby[1][]" />Mango</label> 
  <label> 
        <input class="four" type="checkbox" class="radio" value="4" name="fooby[1][]" />Mango</label> 
  <label> 
        <input class="five" type="checkbox" class="radio" value="5" name="fooby[1][]" />Mango</label> 
</div> 
<div> 
  <h3>Animals</h3> 
  <label> 
        <input class="one" type="checkbox" class="radio" value="1" name="fooby[2][]" />Tiger</label> 
  <label> 
        <input class="two" type="checkbox" class="radio" value="2" name="fooby[2][]" />Sloth</label> 
  <label> 
        <input class="three" type="checkbox" class="radio" value="3" name="fooby[2][]" />Cheetah</label> 
  <label> 
        <input class="four" type="checkbox" class="radio" value="4" name="fooby[2][]" />Cheetah</label> 
  <label> 
        <input class="five" type="checkbox" class="radio" value="5" name="fooby[2][]" />Cheetah</label> 
 
</div> 
<div> 
  <h3>Animals</h3> 
  <label> 
        <input class="one" type="checkbox" class="radio" value="1" name="fooby[3][]" />Tiger</label> 
  <label> 
        <input class="two" type="checkbox" class="radio" value="2" name="fooby[3][]" />Sloth</label> 
  <label> 
        <input class="three" type="checkbox" class="radio" value="3" name="fooby[3][]" />Cheetah</label> 
  <label> 
        <input class="four" type="checkbox" class="radio" value="4" name="fooby[3][]" />Cheetah</label> 
  <label> 
        <input class="five" type="checkbox" class="radio" value="5" name="fooby[3][]" / >Cheetah</label> 
  <input type="hidden" id="radio-previous" name="radio-previous" /> 
</div>

READ ALSO
JavaScript. Print , как менять размер страницы

JavaScript. Print , как менять размер страницы

Есть принтер PT-2430PC https://supportbrother

124
Не подключается скрипт JS на Github Pages

Не подключается скрипт JS на Github Pages

Загрузил свою работу на гитхаб, но на Github Pages видно, что скрипт не подключилсяhttps://indy660

118