【发布时间】:2017-05-04 09:10:33
【问题描述】:
我使用 wordpress 的滑块革命插件,并在使用 fancybox 单击播放按钮时在弹出窗口中加载 youtube。加载视频时我在加载视频之前收到此消息:
“无法加载 youtube api 旋转滑块”
/* change revapi1 to whatever api number is being used for your slider */
var api = revapi1;
/* no need to edit below unless you want to change the default FancyBox settings */
api.on('revolution.slide.onloaded', function() {
jQuery(this).find('.fancybox').each(function() {
var $this = jQuery(this);
if(!$this.is('a')) $this = $this.removeClass('fancybox').find('a');
$this.addClass('fancybox').fancybox({
/* begin FancyBox options */
width: 960,
height: 540,
autoSize: true,
aspectRatio: true,
fitToView: true,
autoCenter: true,
scrolling: 'no',
type: 'iframe',
onClosed: function() {api.revresume()}
}).on('click', function() {api.revpause()});
});
});
【问题讨论】: