SyntaxFix
Write A Post
Hire A Developer
Questions
You can use parents method with specified .class selector and check if any of them matches it:
parents
.class
if ($elem.parents('.left').length != 0) { //someone has this class }