Creating a like/unlike button
Hi Guys,
I am trying to create a like/unlike button for my website.
Any ideas?
Here is the code:
- <script>
- $("#like-unlike").click(function(e) {
- if ($(this).html() == "Like") {
- $(this).html('Unlike');
- }
- else {
- $(this).html('Like');
- }
- return false;
- });
- </script>