[英]button like facebook dosen't work with fancybox
我有一個帶有fancybox的相冊,當fancybox在外部打開時,標題出現類似按鈕。 問題是那行不通。
這是我的JS:
$(".fancyboxi").fancybox({
padding: 0,
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : true,
helpers: {
overlay: {
css: {'background-color': '#333'}
},
title : {
type: 'outside'
}
},
beforeShow: function () {
if (this.title) {
var titulo=this.href;
// Add tweet button
this.title += '<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://kingpollo.it/'+ titulo + '">Tweet</a>';
// Add FaceBook like button
this.title += '<iframe src="//www.facebook.com/plugins/like.php?href=http://kingpollo.it/'+ titulo + '&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:23px;" allowTransparency="true"></iframe>';
}
},
afterShow: function(){
twttr.widgets.load();
},
nextEffect: 'fade',
prevEffect: 'fade'
}); // fancybox});
Twitter按鈕正常工作。 為什么沒有fb按鈕?
// Add FaceBook like button
this.title += '<iframe src="//www.facebook.com/
該部分代碼缺少正確的fb url。
// Add FaceBook like button
this.title += '<iframe src="http://www.facebook.com/
將完整的URL放入facebook按鈕:
<a title="1st title" class="fancybox" href="/images/pic1_full.jpg">
<img alt="Photo number 1" src="images/pic1.jpg"
不起作用,但是:
<a title="1st title" class="fancybox" href="http://www.yousite.com/images/pic1_full.jpg">
<img alt="Photo number 1" src="images/pic1.jpg"
作品
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.