Updating values in one row depending on another value's row
<p>I'm currently trying to update the value of one row - depending on another value's row using jQuery.</p>

<p>For example:</p>

<p>If <strong>Room Allocation = Pending</strong> then the buttons Edit and Cancel appear under Actions
If <strong>Room Allocation != Pending</strong> then the buttons Edit and Decline appear under Actions</p>

<p>How do I go about doing this?</p>

<p>Here is a fiddle I've included: <a href="http://jsfiddle.net/S9Gwy/" rel="nofollow">http://jsfiddle.net/S9Gwy/</a></p>

<p>Here is my code so far:</p>

<pre><code>    $('.results_tbl').dataTable({
        "bPaginate": true,
            "bLengthChange": false,
            "bFilter": true,
            "bSort": true,
            "bInfo": false,
            "bAutoWidth": true
    });

        /*====================================

        determining whether cancel or decline
        button is going to appear depending on
        room allocation status

        =====================================*/

    // find all the booking rows

    var bookingRows = $('table tr.booking');

    // stash a reference to the row

    bookingRows.each(function () {
        var row = $(this);

        // if you can add a class of 'pending' to the status &lt;td&gt;, this becomes even cleaner and nicer...

        // check the contents of the status column

        if (row.find('td.status').text().toLowerCase() == 'pending') {

            // add a class to the row so the CSS can do its thing...

            row.addClass('pending');
        }
    });
</code></pre>
