Monday, May 13, 2013

[Help Wordpress] Pause/Play button - one script for multiple pages


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

Search

Other post

[Nice] [Premium Corporate themes] Modern Interior Responsive Wordpress Theme (Corporate)
[Premium Corporate themes] Modern Interior Responsive Wordpress Theme (Corporate)
[Premium Corporate themes] Modern Interior Responsive Wordpress Theme (Corporate)[Premium ...
[Nice] [Premium Entertainment themes] LA-BAND - Music Band Premium WordPress Theme (Entertainment)
[Premium Entertainment themes] LA
[Premium Entertainment themes] LA-BAND - Music Band Premium WordPress Theme (Entertainment...
[Help Wordpress] TouchCarousel "Match All" not working
Help Wordpress
TouchCarousel "Match All" not workingI'm trying to use touchcarousel to showcase featured ...
[Help Wordpress] Preload slides
Help Wordpress
Preload slidesThe website url: http://1.exto.nazwa.pl/wybrane-realizacje-all/I have a prob...
[Help Wordpress] Plugin not Working after updating to WP 3.6
Help Wordpress
Plugin not Working after updating to WP 3.6We are having the same problem: an upgrade to 3...