简体   繁体   中英

Supersized for WP api call

I installed the supersized plugin for wordpress, which is working great. 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. So, when supersized shows the first image in the slideshow div1 shows on the page. When the slideshow moves to the second slide, div1 needs to go away and show div2, and so on.

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.

Instead of hacking it, though, I would like to hook into it somehow. Something like: $.supersized.api.currentslide or something similar.

Would this be possible at all? Thanks!

This example fits with your Answer:

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

You need to configure a Theme with the init event and api.options. In this example in the file supersized.shutter.min.js

Requires supersized 3.2.5 ¡important!

I think you are looking for this variable

$.supersized.vars.current_slide

good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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