Unable to get values from input fields by ID
<p>I have form fields like this:</p>

<pre><code>&lt;input name='task_complete_percentage[]' value='' onchange='' class='percent' id='task_complete_percentage[]' style='width:40px;' type='text' /&gt;
&lt;input name='task_complete_percentage[]' value='' onchange='' class='percent' id='task_complete_percentage1" + counter + "' style='width:40px;' type='text' /&gt;
&lt;input name='task_complete_percentage[]' value='' onchange='' class='percent' id='task_complete_percentage2" + counter + "' style='width:40px;' type='text' /&gt;
&lt;input name='task_complete_percentage[]' value='' onchange='' class='percent' id='task_complete_percentage3" + counter + "' style='width:40px;' type='text' /&gt;
</code></pre>

<p>Fields are added dynamically and I want to sum all values. </p>

<pre><code> $('[id *= "task_complete_percentage"]').change(function(){             
 $('[id *= "task_complete_percentage"]').each( function () {
 console.log('test');
  }); 
});
</code></pre>

<p>But only first field is working, but if do like this I can see all values. What I'm doing wrong?</p>

<pre><code> $("#addElement").click(function(){             
 $('[id *= "task_complete_percentage"]').each( function () {
   console.log('test');
 }); 
  });
</code></pre>
