title: What is the correct syntax to access elements ID iterated in an array?
body: <p>I have a checkbox named <code>disable</code> next to an input field named <code>hour[i]</code>.</p>
  <p>Then there is an <code>add</code> button which would add a new row (will consist the exact same elements).</p>
  <p>The checkbox when checked in any row, should <strong>disable the input field in that specific row only</strong>.</p>
  <pre><code>&lt;tr v-for=&quot;(item, i) of $v.timesheet.items.$each.$iter&quot;&gt;
      &lt;td&gt;
          &lt;input
              type=&quot;text&quot; 
              name=&quot;hour[]&quot;
              id=&quot;hour[]&quot;
          &gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;input 
              type= &quot;checkbox&quot; 
              name=&quot;disable&quot;
              v-on:click=&quot;disabled(i)&quot;
          &gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;
          &lt;button 
              type=&quot;button&quot; 
              name=&quot;add&quot; 
              class=&quot;btn btn-sm btn-primary&quot; 
              @click=&quot;itemCount++&quot;
          &gt;Add Row
          &lt;/button&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  <pre><code>&lt;script&gt;
  export default {
    data() {
      return {
        timesheet: {
          items: [ {disabled: false} ],
        }
        disabled: (item) =&gt; { },
      };
    },
  };
  &lt;/script&gt;
  </code></pre>
  <p>How do I complete the <code>disabled()</code> function to disable the input for <code>hour</code>?</p>
  <pre><code>disabled(index){
      
  
  }
  </code></pre>
  <p>I tried with this, but it didn't work:</p>
  <p><code>$('#hour['+index+']').attr('disabled', true);</code></p>
  <p>What am I missing in the syntax?</p>