简体   繁体   English

超大的WP API调用

[英]Supersized for WP api call

I installed the supersized plugin for wordpress, which is working great. 我为wordpress安装了超大插件,效果很好。 I have set it up as a slideshow to autoplay without control buttons. 我将其设置为无需控制按钮即可自动播放的幻灯片。 Still working great. 仍然很棒。

Now, my client wants to have certain divs (with content) rotate alongside the background image. 现在,我的客户希望某些div(带有内容)与背景图像一起旋转。 So, when supersized shows the first image in the slideshow div1 shows on the page. 因此,当超大尺寸显示幻灯片div1中显示的第一张图像时,该页面上就会显示。 When the slideshow moves to the second slide, div1 needs to go away and show div2, and so on. 当幻灯片移至第二张幻灯片时,div1需要消失并显示div2,依此类推。

Currently, I can do this by hacking into the supersized.js and add a custom function that passes the current slide number inside the nextSlide() function. 当前,我可以通过侵入supersized.js并添加一个自定义函数来实现此目的,该函数将当前幻灯片编号传递给nextSlide()函数。

Instead of hacking it, though, I would like to hook into it somehow. 不过,我想以某种方式钩住它,而不是对其进行破解。 Something like: $.supersized.api.currentslide or something similar. 类似于: $.supersized.api.currentslide或类似内容。

Would this be possible at all? 这有可能吗? Thanks! 谢谢!

This example fits with your Answer: 此示例适合您的答案:

http://www.cirmiz.eu/supersized/ http://www.cirmiz.eu/supersized/

You need to configure a Theme with the init event and api.options. 您需要使用init事件和api.options配置主题。 In this example in the file supersized.shutter.min.js 在此示例中,文件supersized.shutter.min.js

Requires supersized 3.2.5 ¡important! 需要超大型3.2.5¡重要!

I think you are looking for this variable 我认为您正在寻找此变量

$.supersized.vars.current_slide $ .supersized.vars.current_slide

good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM