title: How to get classname of parent div
body: <p>I have a checkbox within several nested divs. On its <code>OnChange</code> event I want to get the class name of the parent div/container div <code>pan-box placeholder</code>.</p>
  
  <p>The <strong>HTML</strong> structure is something like this</p>
  
  <pre><code>&lt;div class="pan-box placeholder" producttype="I" price="34.99" data-productname="$34.99 Standard 15"&gt;
      &lt;div class="pan-box-head col-md-12 no-pad"&gt;
          &lt;div class="col-md-7 col-sm-12 no-pad pan-price"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-5 col-sm-12 no-pad"&gt;
                  &lt;input type="button" value="View Details" class="viewbtn" onclick="CallOfferRenderAction('SP115','TWCv6')"&gt;
                  &lt;div class="phone"&gt;
                      &lt;input type="checkbox" class="SelectedOffer" id="SP115" onchange="SaveCompairedOffers(this);"&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried  following code, but it returned class-name <code>phone</code> which is the immediate parent of checkbox. How can I get the first div class?</p>
  
  <pre><code>$(this).parent().prop('className');
  </code></pre>