javascript find control id
<p>I have checkboxes generated with an auto ID</p>

<p>I am using the function below:</p>

<pre><code>getAllSelectedFeeds = function() {
 var val = []; 
 $('input:checkbox:checked').each(function(i) {
   val[i] = $(this).attr('id');
 });
 return val;
};
</code></pre>

<p>It checks if any checkboxes are checked but I <strong>only</strong> want it to run for those checkbox controls with "selectedTask" within their autogenerated id such as <code>id="ctl00_m_g_95e8bffc_8200_46ac_887c_98522e26803c_ctl01_ctl02_selectedTask</code></p>

<p>Would this javascript work (using jquery selector) by selecting only those checkboxes checked within a div called 'feedSelector'?
//Get selected checkboxes IDs</p>

<pre><code>getAllSelectedFeeds = function() {
 var val = []; 
 $('#feedSelector:input:checkbox:checked').each(function(i) {
  val[i] = $(this).attr('id');
 });
 return val;
};
</code></pre>
