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