[英]Supersized: playToggle
I am using the Supersized background slideshow: 我正在使用超大背景幻灯片:
http://buildinternet.com/project/supersized/ http://buildinternet.com/project/supersized/
with the following code to pause the Slideshow while loading a modal box. 使用以下代码在加载模式框时暂停幻灯片放映。
Jquery jQuery的
<script type="text/javascript">
$(function($) {
$('#slideInfo').click(function() {
api.playToggle();
});
});
</script>
HTML 的HTML
<div id="btnContainer">
<a id="slideInfo" href="#">More Info</a>
</div>
I am able to pause the slideshow. 我可以暂停幻灯片放映。 However, when I close the modal box the Slideshow won't play back again (it stays paused). 但是,当我关闭模式框时,幻灯片放映将不再播放(它保持暂停状态)。
Is there a way to accomplish this? 有没有办法做到这一点?
Thanks! 谢谢!
EDIT: 编辑:
Here's the test site: 这是测试站点:
http://clientes.ktulumedia.com/peppophotography.com http://clientes.ktulumedia.com/peppophotography.com
And the relevant code: 和相关代码:
<script type="text/javascript">
$(function($) {
$('#slideInfoplay').click(function() {
api.playToggle();
});
});
$(function($) {
$('#sb-nav-close').click(function() {
api.playToggle();
});
});
</script>
Click where it says "test". 单击显示“测试”的位置。 I am able to open the modal box and pause the slideshow. 我可以打开模式框并暂停幻灯片放映。 However, when I close the modal box, I am unable to restart the slideshow. 但是,当我关闭模式框时,无法重新启动幻灯片。
Your plugin usage is true but your jQuery document ready method is wrong. 您的插件用法是正确的,但是jQuery文档ready方法错误。
$(function() {//you shouldnt use '$' inside function()
$('#slideInfo').click(function() {
api.playToggle();
});
});
or 要么
$(document).ready(function() {
$('#slideInfo').click(function() {
api.playToggle();
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.