Flowplayer Overlay - 更改目标选择器
在阅读了 Flowplayer 论坛中的一些主题和回复后,我发现你们可能会更好地帮助我解决问题。
您可能知道 Flowplayer 覆盖插件 使用 rel
属性以特定的覆盖容器为目标。例如:
<a href="#" id="signup" rel="#signupOverlay"></a>
$("#signup[rel]").overlay({
mask: {
color: '#000',
loadSpeed: 200,
opacity: 0.9
}
});
我真的不想使用 rel
属性,而是使用 HTML5 数据属性。
所以它看起来像这样:
<a href="#" id="signup" data-overlay="#signupOverlay"></a>
$("#signup[data-overlay]").overlay({
mask: {
color: '#000',
loadSpeed: 200,
opacity: 0.9
}
});
不幸的是,这不起作用。
因此,我还尝试将插件代码中的以下行: var n=e.target||d.attr("rel");
更改为 var n=e.target| |d.attr("data-overlay");
但这也行不通。
如果你们中的任何一个人之前可能已经遇到过这个问题并解决了它,我很高兴听到如何解决!
After reading some topics and replies in the Flowplayer Forum, I figured out that you guys might be a better help for my problem.
As you may know the Flowplayer overlay plugin uses the rel
attribute to target a specific overlay container. For example:
<a href="#" id="signup" rel="#signupOverlay"></a>
$("#signup[rel]").overlay({
mask: {
color: '#000',
loadSpeed: 200,
opacity: 0.9
}
});
I would really like not to use the rel
attribute, but the HTML5 data attribute instead.
So it would look like this:
<a href="#" id="signup" data-overlay="#signupOverlay"></a>
$("#signup[data-overlay]").overlay({
mask: {
color: '#000',
loadSpeed: 200,
opacity: 0.9
}
});
Unfortunately, this doesn't work.
So, I have also tried to change following line in the plugin code: var n=e.target||d.attr("rel");
to var n=e.target||d.attr("data-overlay");
But this also doesn't work.
If any1 of you maybe already had this problem before and solved it, I would be glad to hear how!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
我还没有这样测试过,但我已经根据与 href 而不是数据覆盖一起使用的代码对其进行了改编,并且它可以工作。我想这也会起作用。
Try this:
I haven't tested like that, but I have adapted it from a code that I use with href instead of data-overlay and it works. I guess that will work too.