In jquery, how can I refer to the parent of $(this)
element with a class
of 'abc'
?
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.