Reference $(this).parent with class name of 'x'

jquery, parent

Solution

Like this:

$(this).parents('.abc');

or

$(this).parent('.abc');

or

$(this).closest('.abc');

`.parent()` and `.parents()` are similar except that `.parent()` only travels up one level in the DOM tree.

Problem

In jquery, how can I refer to the parent of `$(this)` element with a `class` of `'abc'`?

Original source