How to get mouse click event in jquery over facebook like plugin?
Here I am calling facebook like plugin in iFrame after click in that iframe I want to perform some script in my DOM content.
Here code for facebook like plugin for iframe
<iframe id="test" src="http://www.facebook.com/plugins/like.php?
href=http://yoururl.com/&
layout=button_count&
show_faces=false&
width=50&
action=like&
colorscheme=light&
height=21"
scrolling="no" frameborder="0"
style="border:none; over开发者_如何学Goflow:hidden; width:50px;
height:21px;"
allowTransparency="true">
This is answered here.
Summary: Binding click events for iframes can be done, but not cross-site.
I suggest you use the fbml version of the Facebook like button.
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="" send="false" width="450" show_faces="false" font=""></fb:like>
And you can use the following code to do what you want:
FB.Event.subscribe('edge.create', function(response) {
// perform some script in your DOM content
});
精彩评论