title: Using parseint with jquery to find other values
body: <p>I have several form fields that end in an integer value.  I want to find that integer and use it to find the values of other form fields.  Right now, when using the integer to create a jQuery selector, the selector results in <code>undefined</code> when trying to capture the value.</p>
  
  <p>Form code:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="checkbox" name="fee_hidden8" value="8" id="fee_hidden8" class="btoggle" data-toggle="toggle" data-on="&lt;i class='glyphicons glyphicons-eye-close'&gt;&lt;/i&gt; Hidden" data-off="&lt;i class='glyphicons glyphicons-eye-open'&gt;&lt;/i&gt; Visible" data-onstyle="danger" data-offstyle="success" data-size="small" &gt;
       &lt;br&gt;&lt;span class="bg-warning"&gt;Waiting for Input&lt;/span&gt;&lt;/div&gt;
      &lt;div class="col-xs-3"&gt;&lt;a href="account_edit.cfm?fc=8&amp;yr=2016&amp;tab=1"&gt;&lt;h4&gt;New Leagues&lt;/h4&gt;&lt;/a&gt;&lt;br /&gt;Season: 2016&lt;/div&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="text" id="fee_open_date8" name="fee_open_date8" class="pickdate btoggle form-control" value=""&gt;&lt;/div&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="text" id="fee_close_date8" name="fee_close_date8" class="pickdate btoggle form-control" value=""&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="checkbox" name="fee_hidden7" value="7" id="fee_hidden7" class="btoggle" data-toggle="toggle" data-on="&lt;i class='glyphicons glyphicons-eye-close'&gt;&lt;/i&gt; Hidden" data-off="&lt;i class='glyphicons glyphicons-eye-open'&gt;&lt;/i&gt; Visible" data-onstyle="danger" data-offstyle="success" data-size="small" &gt;
       &lt;br&gt;&lt;span class="bg-warning"&gt;Waiting for Input&lt;/span&gt;&lt;/div&gt;
      &lt;div class="col-xs-3"&gt;&lt;a href="account_edit.cfm?fc=7&amp;yr=2016&amp;tab=1"&gt;&lt;h4&gt;New Camps&lt;/h4&gt;&lt;/a&gt;&lt;br /&gt;Season: 2016&lt;/div&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="text" id="fee_open_date7" name="fee_open_date7" class="pickdate btoggle form-control" value=""&gt;&lt;/div&gt;
      &lt;div class="col-xs-2"&gt;&lt;input type="text" id="fee_close_date7" name="fee_close_date7" class="pickdate btoggle form-control" value=""&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>$(function() {
      $('.btoggle').change(function() {
          var id = parseInt($(this).attr("id").match(/(\d+)$/)[0], 10)
          var id = id.toString();
  
          if($("fee_hidden" + id).prop('checked'))
          {var st = 'Yes'}
          else
          {var st = 'No'};
  
          var fx = $("fee_hidden" + id).val();
          var od = $("fee_open_date" + id).val(); 
          var cd = $("fee_close_date" + id).val(); 
          alert(st + " " + id + " " + fx + " " + od + " " + cd);
  
          $.post("tsafunctions.cfc", {
              method: 'visiblehidden',
              fc: fx,
              status: st,
              od: od,
              cd: cd
              });
      })
  });
  </code></pre>