超大:playToggle [英] Supersized: playToggle
问题描述
我正在使用超大背景幻灯片:
I am using the Supersized background slideshow:
http://buildinternet.com/project/supersized/
使用以下代码在加载模式框时暂停幻灯片放映.
with the following code to pause the Slideshow while loading a modal box.
jQuery
<script type="text/javascript">
$(function($) {
$('#slideInfo').click(function() {
api.playToggle();
});
});
</script>
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?
谢谢!
这是测试地点:
http://clientes.ktulumedia.com/peppophotography.com
以及相关代码:
<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.
推荐答案
您的插件用法是正确的,但是您的已准备好jQuery文档方法是错误的.
Your plugin usage is true but your jQuery document ready method is wrong.
$(function() {//you shouldnt use '$' inside function()
$('#slideInfo').click(function() {
api.playToggle();
});
});
或
$(document).ready(function() {
$('#slideInfo').click(function() {
api.playToggle();
});
});
这篇关于超大:playToggle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!