title: How do I create a simple 'like' button using jquery.ajax()?
body: <p>Trying to make a thumbs-up button (created using font awesome) that allows people to 'like' a comment. I'm trying to use a span instead of a button and I'm trying to submit some hidden fields that are within the span. Not sure if this is a good idea!</p>
  
  <p>Would really appreciate some help as I don't think the data is right. I don't know how to tell what's being posted, but keep getting blank in console.log when I click the span.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;span class="fontawesome-uniF087 thumb"&gt;
  &lt;input type="hidden" name="userID" value="1111"&gt;
  &lt;input type="hidden" name="commentID" value="2222"&gt;
  &lt;input type="hidden" name="articleID" value="3333"&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>    jQuery(".thumb").click(function() {
  
          var url = "AJAXthumbsup.asp";
  
          jQuery.ajax({
                 type: "POST",
                 url: url,
                 data: jQuery(this).serialize(),
                 success: function(data) { // on success.. 
  
                      console.log(data);
                      jQuery(this).html(data); // update the span
  
                 }
            });
  
          return false; 
  
      });
  </code></pre>
  
  <p>Many thanks,</p>
  
  <p>Katie</p>