Selecting elements by attributes of given value
<p>I have the table below.  I also have this array who's values correspond to the data-id attributes of the rows <strong>[52,24,12]</strong>.  One and only one row will exist in the table for each array value.  I would like to increment the count column for each row which exists in the array.  For instance, 12 would change to 13, 32 would change to 33, and 6 would change to 7.  A jQuery solution is preferred, however, a native JavaScript solution would suffice.  Thank you</p>

<pre><code>&lt;table&gt;
 &lt;thead&gt;
  &lt;tr&gt;&lt;td&gt;count&lt;/td&gt;&lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
  &lt;tr data-id="24"&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;
  &lt;tr data-id="52"&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
  &lt;tr data-id="42"&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
  &lt;tr data-id="84"&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr data-id="12"&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
