English 中文(简体)
装货箱 URL按需求输送流
原标题:load facebook s URL feed stream on demand won t work

我正试图展示我网站URL的面对面资料,以向用户展示我网页上像的面对面用户。

(一) :

进口面纱

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1&appId=82743675977";
  fjs.parentNode.insertBefore(js, fjs);
}(document,  script ,  facebook-jssdk ));</script>

呼吁:

function showFeed(){
        return  <div class="box"><h2><img src="http://www.google.com/s2/favicons?domain=keepourlinks.com"/> keepyourlinks </h2><div class="fb-activity" data-site="keepyourlinks.com" data-width="300" data-height="500" data-header="false" data-border-color="white" data-recommendations="false"></div></div> ;
    }

    $(document).ready(function(){
        $( #show ).click(function(){
            $( #feed ).html(showFeed());

        });
    });

http://jsfiddle.net/7cPDK/6/“rel=“nofollow”http://jsfiddle.net/7cPDK/6/。

如何做到这一点的想法?

PD:愿意这样做(按需求载荷:不装上载页,按需求显示)

最佳回答

我认为,你只是想把文字带上点击手:

1) The script from the html:

<div id="fb-root"></div>
<a id="show" href="#">Show What facebook users share
<div id="feed"></div>

b) 将其带入点处理器,并用id facebook-jssdk删除该元素。 首先是:

$( #show ).click(function(){
    $( #facebook-jssdk ).remove();
    (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1&appId=82743675977";
        fjs.parentNode.insertBefore(js, fjs);
    }(document,  script ,  facebook-jssdk ));
    $( #feed ).html(showFeed());
});

另见example

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签