I'm using the Wordpress plugin and plan to add slideshows to a number of pages. I'd like to use a single jQuery script in the head of all pages to append a Pause/Play button to the slideshow (inside the .royalSlider div) and set the button text to the opposite of the Autoplay state assigned in the sliders' settings.
I've read the "Creating play/pause button" article, tested that it works, and modified it to get the ID of the slideshow from the .royalSlider div and set it as a selector in a variable. e.g.
var rsid = $(".royalSlider").attr('id');
var rs = $('#' + rsid);
The difficulty comes in how to identify the Autoplay state set in the slider's Wordpress options and use this to determine the initial state of the button and toggling function.
Any pointers would be appreciated. (A built-in Pause/Play option in a future version even more so!)
.
help.dimsemenov.com
No comments:
Post a Comment