title: jQuery conditional action when event fires
body: <p>I have a generated table that contains multiple rows with each row containing a leading <code>td</code> with a checkbox and another <code>td</code> with a select list =</p>
  
  <pre><code>&lt;div class="table"&gt;
  &lt;table width="100%" class="tframe" id="table0"&gt;
  &lt;thead&gt;
  &lt;tr class="trheadline"&gt;
      &lt;th&gt;Selection&lt;/th&gt;
      &lt;th&gt;Repository-Tag&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;tr class="trow"&gt;
      &lt;td&gt;
          &lt;input type="checkbox"
            value="0#298#abk_testn#l#CLEARCASE#at_web_vob"
            name="module"&gt;ModuleA
      &lt;/td&gt;
      &lt;td&gt;
      &lt;select name="cvstags"&gt;
          &lt;option value="no_Repository"&gt;no_Repository&lt;/option&gt;
          &lt;option value="220607_143102110"&gt;220607_143102110&lt;/option&gt;
          &lt;option value="220607_09410236"&gt;220607_09410236&lt;/option&gt;
          &lt;option value="220507_091903814"&gt;220507_091903814&lt;/option&gt;
      &lt;/select&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="trow"&gt;
      &lt;td&gt;
          &lt;input type="checkbox"
            value="1#299#abk_integration#d#CLEARCASE#at_web_vob"
            name="module"&gt;ModuleB
      &lt;/td&gt;
      &lt;td&gt;
      &lt;select name="cvstags"&gt;
          &lt;option value="220607_143102110"&gt;220607_143102110&lt;/option&gt;
       &lt;/select&gt;
      &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="trow"&gt;
       &lt;td&gt;
          &lt;input type="checkbox"
            value="2#301#abk_statcont##CLEARCASE#at_web_vob"
            name="module"&gt;ModuleC
      &lt;/td&gt;
      &lt;td&gt;
      &lt;select name="cvstags"&gt;
          &lt;option value="no_Repository"&gt;no_Repository&lt;/option&gt;
          &lt;option value="220607_143102110"&gt;220607_143102110&lt;/option&gt;
          &lt;option value="220607_09410236"&gt;220607_09410236&lt;/option&gt;
          &lt;option value="220507_091903814"&gt;220507_091903814&lt;/option&gt;
      &lt;/select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;
   &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I want to pin a change event upon the select, but I want an action only to get started, if the leading checkbox is checked, for now I have =</p>
  
  <pre><code>&lt;script&gt;
      $('select').change(function(){
          alert($(this).val());
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>which gives me the value of the selected option, fine but two problem remain =</p>
  
  <ol>
  <li><p>how to check whether the leading checkbox in the same tr is checked ?</p>
  
  <pre><code>$('select').change(function(){
   if (the leading checkbox is checked) {
      run my action..
   }
  });
  </code></pre></li>
  <li><p>the change event doesn't work if the select list has only
  one option as in the second row of my example above, how
  to achieve a similar behaviour as with change event for that case ?</p></li>
  </ol>
  
  <p>Thanks for any hints !!</p>