A solution for this may be in a previous topic – see:
https://ww.wp.xz.cn/support/topic/need-help-i-want-to-start-slider-when-its-visible-not-on-page-load/
Do the jQuery code you would use would be:
<script>
var owl = jQuery('#SLIDER_ID');
jQuery('#button').on("click", function(e) {
owl.trigger('play.owl.autoplay', [1000]);
});
</script>
Where ‘#SLIDER_ID’ is the CSS ID of your Slide Anything slider.
And ‘#button’ is the CSS ID of a button in your popup.
Also in your slider settings, set your ‘Slide Duration’ to ‘0’.
Thread Starter
Terek
(@terekj)
Many thanks!
This works excellently and exactly how I wanted it
My only issue is that it does not work in the popup however that is due to how the popup plugin is coded and not yours, thanks for the quick response
Well investigate using another event, and not button click event:
jQuery('#button').on("click", function(e) {
For example if your popup plugin changes the class of a wrapper in order to display you could use something like:
jQuery('#myDiv').on('classChange', function() {
// do stuff
});
there are loads of jQuery events: https://api.jquery.com/category/events/
(you trigger on hover, focus, mouseover etc)
-
This reply was modified 5 years, 2 months ago by
simonpedge.
I’m assuming that this solution worked for you, so I’m marking this topic as closed.