binding onblur and onclick events using jQuery to show the next tr in a table that is already hidden
<p>Okay, this will be the last question, although I'm learning alot about jQuery from you guys so thanks!</p>

<p>Okay as I've mentioned previously (<a href="http://stackoverflow.com/questions/6844516/use-jquery-to-find-the-collective-radio-button-group-name">see original</a>)... "I'm currently having to extend an very old ASP.NET site which has a database generated front end and is a behemoth of an application, it needs completely rewriting - however I've been told to add to it than redevelop it "</p>

<p>Okay, the backend renders a table which I have little control over, it produces element names and ids using GUID (or something). I've amended the backend to output 4 rows in a table (the example shows one row but all have the same structure just different names and ids), jQuery loops through this table, switching the innerHTML of one cell to another and hiding some of the rows. It traverses the table and returns the radio button group name on a specific row. It also take the value of the textbox on that row too, I'll need this later...</p>

<pre><code>&lt;table id="tableID"&gt;
    &lt;tr&gt;     
        &lt;td class="qCol"&gt;     
        &lt;!-- Label here --&gt;     
        &lt;/td&gt;      
        &lt;td class="qCo2"&gt;     
        &lt;!-- img here --&gt;     
        &lt;!-- and a text box --&gt; 
                  &lt;input type="text" name="*" id="*" class="currentPaymentAmount"/&gt;
        &lt;/td&gt;      
        &lt;td class="qCo3"&gt;     
        &lt;!-- select menu here --&gt;     
        &lt;/td&gt;      
        &lt;td class="qCo4"&gt;     
        &lt;!-- 2 radio buttons here --&gt;     
        &lt;/td&gt;      
        &lt;td class="qCo5"&gt;     
        &lt;!-- select menu here --&gt;     
        &lt;/td&gt;     
        &lt;td class="qCo6"&gt;     
        &lt;!-- hidden validation image here --&gt;     
        &lt;/td&gt; 
    &lt;tr&gt; 
&lt;/table&gt; 
</code></pre>

<p>I now want to extend the jQuery so if a radio button is checked on that row and the text box with the class of currentPaymentAmount on the same row has a length larger than zero the next row is displayed (which should be hidden).</p>

<p>Here's my jQuery so far...</p>

<pre><code>    $('#tableID tr').each(function (i) {          

        /*switch select and validation and clear */         
        $(this).children('td.qCol').html($(this).children('td.qCo5').html());
        $(this).children('td.qCo5').html("");        
        /* hide all but the first row*/        
         if (i &gt;= 1) {            
            $(this).hide();
         }

         /* get the radio button name and check if either are selected also see if the text box exists*/
        if ($(this).find('input:radio').attr('name') &amp; $(this).find('input.currentPaymentAmount')) {
            var thisRadioName = $(this).find('input:radio').attr('name');
            var thisAmount = $.trim($(this).find('input.currentPaymentAmount').val());

/* now check to see if either of the radio buttons are checked and the textbox has a value*/

}
</code></pre>

<p>I now need to check that one of the checkboxes are checked and the legth of the amount is greater than zero, if all is well I want to show the next row (which should be hidden)... something like this</p>

<pre><code>     /* now check to see if either of the radio buttons are checked and the textbox has a value*/


if ($(this).find('input[name=' + thisRadioName + ']:checked') &amp;&amp; amount.length &gt; 0) {
        $(this).next().show();

}
</code></pre>

<p>I'll then have to bind these to a blur event on the text box and the onclick of the radio buttons... how on earth do I do this?</p>

<p>I realise how complicated this is and my explaination is pretty awful. I'd find this easier in JavaScript but I wish to start using jQuery so I write less!</p>
