When reimplementing Drupal.tableDrag.prototype.dropRow(), how do I access classes of would-be parent? Using code below, I can access classes of a row that's being dropped:

Drupal.tableDrag.prototype._dropRow = Drupal.tableDrag.prototype.dropRow;
Drupal.tableDrag.prototype.dropRow = function(event, self) {
  console.log('dropRow');
  console.log("feature-group: " + $(self.rowObject.element).hasClass('feature-group'));
  console.log("feature: " + $(self.rowObject.element).hasClass('feature'));
  if ( /* use classes here */ ) {
    /* return custom result here */
  }
  /* fallback to default here */
  return self._dropRow(event, self);
};


But now I don't want to test classes of a dragged row, but ones of a row that would be a parent. How do I do that?

To clarify: I need tabledrag parent, not DOM parent. All tabledrag rows are DOM siblings, and I need the row with ID field value equal to the would-be Parent ID field value (class="parent") of a dragged row.

Something in JavaScript sets the parent ID properly, during either drag or drop (can't tell), so I'm sure there is a way. I just don't know how to find it.
Get a reference to some parent DOM element ... the jquery parents() or parent function(s) comes to mind. Then use hasClass on those parents as needed.

some parent would be something like the following based on your example:

var parents = $(self.rowObject.element).parents(/* a selector to limit the type of parent, td, tr, whatever */);


EDIT:

dragged rows get a class of like .dragged-previous. The file tabledrag.js doesnt care about the current row, nor about IDs of anything during drag -- its just doing a DOM swap of rows and inserting the dragged row before another row; and assigning a Drupal weight to the hidden weight column. So cant you use like jquery prev() function to get the immediate previous element:

var parent = $('#menu-overview tr.drag-previous').prev();


I'm taking these values from a Main Menu tabledrag example of a vanilla D7 site: