-1

I can show and hide individual fieldset rows in jQuery 3.3.1, like this:

$("div.form-row.field-construction_start_date").show();
$("div.form-row.field-construction_start_date").hide();

But let's say I want to disable an individual fieldset row and all the controls in that singular row, like this:

$("div.form-row.field-construction_start_date").prop("disabled",true);

It does not work. Might anyone have some insight as to what I am doing wrong?

arc
  • 37
  • 6
  • 1
    The `div` element does not have a `disabled` attribute or property. You have to use a `fieldset` element, or disable individual controls within the `div`. – Heretic Monkey Feb 13 '19 at 18:46
  • 1
    Possible duplicate of [How to disable all div content](https://stackoverflow.com/questions/639815/how-to-disable-all-div-content) – Heretic Monkey Feb 13 '19 at 18:47

1 Answers1

0
$("div.form-row.field-construction_start_date :input").prop("disabled",true);
JoaoGRRR
  • 313
  • 2
  • 9