Q:

jQuery addClass as long as at least one descendant has class

I'm trying to highlight a table row as long as a least one of its descendants (a.selectable) has a particular class (selectedLink).  I've gotten the row to highlight as long as all of its a.selectable elements have the mentioned class, but I can't get it to work if just one a.selectable element has the selectedLink class, which is my goal. 
Here's a jsfiddle of the problem: http://jsfiddle.net/Ly4WL/51/ On the second row, BOTH a.selectable elements must be clicked for the row to highlight, and I'd like it to work if any of the descendant a.selectable elements have the class selectedLink. 
The table follows this format:
<table>
    <tr>
        <td><a class="selectable" href="joe@mail.com">Joe</a></td>
        <td>Joes Program</td>
        <td>Date</td>
    </tr>
    <tr>
        <td><a class="selectable" href="jane@mail.com">Jane</a></td>
        <td><a class="selectable" href="janeprogram@mail.com">Jane's Program</a></td>
        <td>Date</td>
    </tr>
</table>

To highlight cells and rows, I'm using this jQuery:
$( 'a.selectable' ).click(function( event ) {
  event.preventDefault();
  //highlight link and rows
  $( this ).toggleClass( 'selectedLink' );
  $( this ).parents( 'tr' ).has( 'a.selectedLink' ).removeClass( 'selectedRow' );
  $( this ).parents( 'tr' ).has( 'a.selectedLink' ).addClass( 'selectedRow' );
  $( this ).parents( 'tr' ).has( 'a:not( .selectedLink )' ).removeClass( 'selectedRow' );
});

A:

The problem is that, unlike is(), .has() returns a jQuery object (not boolean), so you need to check it's length
$('a.selectable').click(function (event) {
    event.preventDefault();
    $(this).toggleClass('selectedLink');
    if ($(this).closest('tr').has('a.selectedLink').length)
      $(this).closest('tr').addClass('selectedRow');
    else
      $(this).closest('tr').removeClass('selectedRow');
});

Demo

