开发者

Loading jScrollPane after initializing Facebook Comments - how?

Is there an 开发者_开发技巧"onComplete" state or similar for the Facebook Comments plugin? I'm trying to add a jScrollPane scrollbar to a content box that has FB Comments inside it. What happens is I get the FB Comments iframe placed on top of the box's content (as if it had an absolute position / was floating. Guessing this has to do with FB Comments initializing after jScrollPane.

Edit:

Now what I'm really after is combining ColorBox, Facebook Comments and jScrollPane and the headache starts pretty soon:

$('.mybox').colorbox({  innerWidth: 640, innerHeight: 480, scrolling: false, onComplete: function() {
    $('#cboxLoadedContent').jScrollPane({
// Init FB Comments here instead? Then call jScrollPane?
      showArrows: true,
      scrollbarWidth: 15,
      scrollbarMargin: 0
      });
    }, 
    onClosed: function() {
// What would happen here if I need to listen for FB Comments also?
      $('#cboxContent').jScrollPaneRemove(); 
    }
    });

Sorry if my question is a bit unclear, it's late and I've been in front of a screen for 10+ hours.


Using the xfbml.render event:

FB.Event.subscribe('xfbml.render', function() {
    console.log('Loaded!');
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜