Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 775 Bytes

File metadata and controls

49 lines (34 loc) · 775 Bytes

Disable text if checked

When the checkbox is checked, disable the text.
チェックボックスがチェックされたら、テキストを無効化します。

Setting

Path Pattern

None

Insert Position

Bottom of issue form

Code

JavaScript

$(function() {

  const checkbox = $('#issue_custom_field_values_1');
  const text = $('#issue_custom_field_values_2');

  function changeEnableText() {
    text.prop('disabled', checkbox.prop('checked'));
  }

  checkbox.on('change', changeEnableText);

  changeEnableText();
});

Result

result