Append css to facebook iframe by jQuery?
is there any way, to append css开发者_Go百科 to a fb like Iframe?
I tried it this way:
jQuery(window).load(function(){
var html = jQuery(".like_single iframe").contents().find("connect_widget_vertical_center").html();
alert(html);
});
And got this error in firebug:
Permission denied to access property 'ownerDocument'
No. Since the contents of the iframe are served from a different domain, you don't have permission to access or modify the contents. This is a security feature enforced by the browser, called the same origin policy.
Have you tried doing this:
$(function(){
var html = $("connect_widget_vertical_center").html();
alert(html);
});
Add this to the source of the iFrame, in the head section.
精彩评论