hide/show table cell based on previous cell
<p>I would like to show/hide a table cell based on the value in the previous cell. If the previous cell has a value than show else hide. Jquery should evaluate this for every row. I now have the following code:</p>

<pre><code>    jQuery(document).ready(function() {
    jQuery('input[name^="OS"]').hide();
    jQuery('input[name^="OF"]').on('keyup', function(){ 
        jQuery('table#form_er tr').each(function(){ 
            if(!jQuery('input[name^="OF"]').val()){
                jQuery('input[name^="OS"]').hide();}
            else {jQuery('input[name^="OS"]').show();}
        });
    });
});
</code></pre>

<p>The result now is that all the OS-cells are hiden even if OF is filled, if I fill an empty OF all the OS-cells are show and when I clear an OF-cell nothing changes. 
Can someone point me in the right direction? Thank you.</p>
