find parent div by class name jquery code example
Example 1: jquery has parent with class
if ($elem.parents('.left').length) {
}
Example 2: jquery get the parent node
$(selector).parent(filter)
if ($elem.parents('.left').length) {
}
$(selector).parent(filter)