title: How get class name from 'this' reference in jquery
body: <p>I want to know how can I get the class name of an element from <code>this</code> reference.
  I have following HTML element</p>
  
  <pre><code>&lt;input type="checkbox" class="NotSelected @placeholderString" onchange="SaveCompairedOffers(this);"&gt;
  </code></pre>
  
  <p><strong>jQuery code</strong></p>
  
  <pre><code>function SaveCompairedOffers(obj) {
      //Hiding irrelevant code from here
  
      AddCompareOfferInCompareBox();
  }
  </code></pre>
  
  <p>In the AddCompareOfferInCompareBox function I want to append class name of the object on <code>compare-box</code> class.</p>
  
  <pre><code>function AddCompareOfferInCompareBox()
  {
      var innerHtml = "";
      $('.SelectedOffer').each(function () 
          //append class name of current passed object to this div
          innerHtml = innerHtml + '&lt;div class="compare-box"&gt;&lt;/div&gt;';
      });
      $(".AddCompareOfferByMe").html(innerHtml);
  }
  </code></pre>
  
  <p>How can I do this? </p>