I have checkboxes on my list. When you click on any checkbox, the input that belongs to it get invisible. I used the following javascript function. but it didn't.

my js function:

```
function ActivePassive() {

    var list = document.getElementsByClassName("switchery");

    for (var i = 0; i < list.length; i++) {
        if (liste[i].checked) {
            console.log("aa"); // if checked = true, it write aa.
            document.getElementById("focus").style.display = 'block'; //but it doesn't work
            }
        else {
            console.log("bb"); // if checked = false, it write bb.
            document.getElementById("focus").style.display = 'none'; //but it doesn't work
            }
    }
}

```

mt html code:

```
        <td>
             <div class="form-group">
                <div class="col-md-10">
                   <div class="checkbox checkbox-switchery">
                       <label>
                    @Html.CheckBoxFor(modelItem => Model[i].status, new {  @class = "switchery" , @onchange = "ActivePassive()" })
                  <label class="label-rounded bg-blue-300">
                      Yes/No
                        </label>
                    </label>
                  </div>
             </div>
          </div>
      </td>

 <td>
      <div id="focus" class="col-md-4">
            <div class="form-group has-feedback has-feedback-left">
                     @Html.EditorFor(modelItem => Model[i].Value, new { htmlAttributes = new { @class = "form-control" } })
                       @Html.ValidationMessageFor(modelItem => Model[i].Value, "", new { @class = "text-danger" })
                  </div>
            </div>
       </td>

```