Here's another approach, which seems a little better to me:
```javascript
$( '.toplevel_page_wp_stream #the-list tr.record-group:visible' ).each(function() {
    $first = prevAll( '.first' ).eq(0);
    if ( $first.hasClass( 'alternate' ) {
        $( this ).addClass( 'alternate' );
    }
});