title: Check parents elements contain a specific CSS class by only using javascript?
body: <p>When I click on any DOM element I want to check if its parents element contains a specific class or not. I am trying in this way but can't achieve this goal. Does anyone know how? </p>
  
  <pre><code>document.onclick=function(e){
      console.log(e.parentElement('.drop').id);       
  }
  </code></pre>
  
  <p>Please give solution in JavaScript only - I can't use jQuery.</p>