有人可以建議我如何加載與URL的彈出我想要像pinterest網站(https://www.pinterest.com/)一樣。所以它可以幫助Facebook使用不同的URL評論。加載與不同的動態網址使用jQuery的彈出
我只是將參數追加到當前的URL,這不利於FB評論。
好吧,我加入我下面的代碼: 彈出代碼:
<a class="" href="/log/viewlist?id={{$data->id}}" data-target="#myModal" data-toggle="modal">My modal</a>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Event Name</h4>
</div>
<div class="modal-body">
<p>Details</p>
</div>
<div class="fb-comments" data-width="500"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
的Jquery:
$('#myModal').on('show.bs.modal', function (e) {
window.location.url = "/log/viewlist?id=" + $(this).attr('href');
var url = $(this).attr('href');
$('.fb-comments').attr('data-href',url);
});
我的頁面加載與此,但Facebook的數據href是以此爲不同的網址,但該意見我在一個彈出窗口中顯示這些註釋出現在每一個模式中,但我想顯示僅爲該模式彈出窗口更新的註釋。
那麼有沒有其他的方式可以加載模式與URL可以採取單獨的Facebook評論。
請提出任何建議。謝謝 !
你嘗試過這麼遠嗎? – Aj334
所以不要提供代碼寫入服務,只要你自己努力就發佈它,如果你不能使它工作 – LGSon
@LGSon:我已經添加了我的代碼,即時嘗試使其工作,但它不工作。我有任何想法! – 06011991