Slider Revolution WP
09.27.2016
After copy/pasting the script, change the “1” in the “revapi1” part to whatever your slider’s ID is.
In the following screenshot, if we wanted to apply the script to that particular slider, since the slider’s ID is “12”, the “revapi1” part of the script would become “revapi12”.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
revapi1.on('mouseenter mouseleave', function(event) { var action = event.type === 'mouseenter' ? 'pause' : 'resume'; jQuery('.tp-caption').each(function() { var anime = jQuery(this).data('timeline'); if(anime) anime[action](); }); }); |
After copy/pasting the script, change the “1” in the “revapi1” part to whatever your slider’s ID is.
In the following screenshot, if we wanted to apply the script to that particular slider, since the slider’s ID is “12”, the “revapi1” part of the script would become “revapi12”.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
var api = revapi1; window.pauseRevSlider = function() { api.revpause(); jQuery('.tp-caption').each(function() { var anime = jQuery(this).data('timeline'); if(anime) anime.pause(); }); }; window.resumeRevSlider = function() { api.revresume(); jQuery('.tp-caption').each(function() { var anime = jQuery(this).data('timeline'); if(anime) anime.resume(); }); }; |