【发布时间】:2013-11-11 10:43:07
【问题描述】:
我今天做一个话题,因为我的插件 Fancybox 2.0 (http://fancyapps.com/fancybox/) 有问题。
事实上,我想根据当前fancybox中的媒体设置不同类型的标题。如果我的 Fancybox 中有 iFrame,则标题必须为“外部”。否则,如果是其他媒体,标题必须是“结束”。
$(".fancybox").fancybox({openEffect: 'elastic',closeEffect: 'elastic',beforeShow: function() {
share_buttons_fancybox = '<div class="center" style="margin-top:10px;"><div class="bouton_social"><div class="fb-like" data-href="' + $(this.element).attr('href') + '" data-width="90" data-layout="button_count" data-show-faces="false" data-send="false"></div></div><div class="bouton_social"><a href="https://twitter.com/share" data-url="' + $(this.element).attr('href') + '" class="twitter-share-button" data-via="playeronetv" data-lang="fr">Tweeter</a></div><div class="bouton_social"><div class="addthis_toolbox addthis_default_style" addthis:url="' + $(this.element).attr('href') + '"><a class="addthis_counter addthis_pill_style"></a></div><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-52248d25116616ca"></script></div></div>';
if (this.title) {
this.title += share_buttons_fancybox;
} else {
this.title = share_buttons_fancybox;
}
},afterShow: function() {
twttr.widgets.load();
FB.XFBML.parse();
addthis.toolbox();
addthis.toolbox(".addthis_toolbox");
addthis.counter(".addthis_counter");
},helpers: {thumbs: {width: 80,height: 45},title: {type: 'over'}},padding: 0})
有什么想法吗? iFrame 和其他媒体必须在同一个 Fancybox 库中。 :)
提前谢谢,对不起我的英语(我是法国人):)
【问题讨论】:
标签: jquery fancybox fancybox-2