title: jquery: check the current toggled class
body: <p>So, this is my code </p>
  
  <pre><code>     $(".heart.fa").click(function() {
            $(this).toggleClass("fa-heart fa-heart-o");
  
  //Wanna check here is its fa-heart or fa-heart-o
  
             var row = $(this).closest("i");
             var rowId = row.attr("id");
              alert(rowId);
  
          });
  
  &lt;div&gt;
    &lt;i id= '".$i."' class='heart fa fa-heart-o'&gt;&lt;/i&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Want to check inside this function if it's currently <code>fa-heart-o</code> or <code>fa-heart</code></p>