title: How to create LIKE and UNLIKE button in jquery
body: <p>I want to create LIKE and UNLIKE button in jquery, what i did is , </p>
  
  <pre><code> &lt;span&gt;&lt;a class="like-Unlike" href=""&gt;Like&lt;/a&gt;&lt;/span&gt; |
     function LikeUnLikeButton() {
              $(".like-Unlike").click(function (e) {
                  if ($(this).html() == "Like") {
                      $(this).html('Unlike');
                  }
                  else {
                      $(this).html('Like');
                  }
              });
          }
  </code></pre>
  
  <p>but it is not working , problem is when i click on LIKE button i can see unlike button and again it's back to LIKE button</p>
  
  <p>Please check it out here : <a href="http://jsfiddle.net/mHJnH/" rel="nofollow">http://jsfiddle.net/mHJnH/</a></p>