refresh div containing facebook like button
My like button code goes as follows:
<div class="like-btn">
<fb:like href="http://www.example-url.com" layout="box_count"
show_faces="true" width="450" action="like" colorscheme="light"
></fb:like>
</div>
My problem is that, I do not want the comment box to be displayed after
clicking like. I'm using XFBML version of Like Button for tracking
purpose, so comment box is inevitable.
I have multiple like buttons in the page with variable href's.
I have read all the questions/solutions regarding removing the comment box
in this scenario, but none of them work. I'm hoping that Refreshing the
contents of <div class="like-btn"> would help.
Could someone please help me figure out how I should tackle this problem?
Here is my attempt so far:
//copying content of the div since the href is retrieved via php and is
variable
var content = $('.like-btn').html();
$('.like-btn').empty();
$('.like-btn').html(content);
Thank you.
No comments:
Post a Comment