is there any way how to auto resize the iframe(can开发者_JS百科vas) to show all my content? I don't want the scrollbar. I tried every JS method and nothing worked.
It's possible but it's quite tedious. See this answer here: Resizing an iframe based on content
Or...
jQuery(window).load(function(){
FB.Canvas.setSize();
});
Wait till everything has loaded then reset the size.
I use this code and it works for all content height's, even when I need to decreased it:
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID',
status : true,
cookie : true,
xfbml : true,
oauth: true
});
FB.Canvas.setSize({height:600});
setTimeout("FB.Canvas.setAutoGrow()",500);
};
精彩评论