Carousel Banner autoplay stops after prev/next button clicked
- Posted by Dmitry (9) Offline
Is it intended that autoplay stops after prev/next button manually clicked? I tried it in Chrome with Gantry 5 template, and it seems that refreshing page is the only cure. Could you please modify the code so that autoplay starts again after the Timeout is passed? Thank you very much!
3 years 8 months ago #1
by Dmitry
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5261) Offline
Hi, This is intended behaviour of the javascript lib. When a user clicks the controls/nav, it is supposed that he/she wants to manually check the slides
3 years 8 months ago #2
by TemplatePlazza
Please Log in or Create an account to join the conversation.
- Posted by Dmitry (9) Offline
- Posted by TemplatePlazza (5261) Offline
Basically you can do that by adding this code below to the file ../modules/mod_carousel_banner/mod_carousel_banner.php, but it won't work right away. it will require changes to the css files and possibly php as well
3 years 8 months ago #4
by TemplatePlazza
autoplayText: [
'▶',
'❚❚'
],
Please Log in or Create an account to join the conversation.
- Posted by Dmitry (9) Offline
I will try it. I suppose many Carousel Banner users would be glad to see this function in the native code if it is possible and convenient.
Thank you very much for the help!
3 years 8 months ago #5
by Dmitry
Thank you very much for the help!
Please Log in or Create an account to join the conversation.
- Posted by Dmitry (9) Offline
I found the certain way to activate play/pause button without css editing. You can add the code below to the file mod_carousel_banner.php right after "autoplayHoverPause:true," string.
autoplayButtonOutput: true,
autoplayText: ,
I managed to move the button to the bottom of the carousell by editing style.min.css file. You can modify ".tns-outer [aria-controls],.tns-outer [data-action]{cursor: pointer;}" string, adding "top:100%;position:absolute;display:block;left:49%;" after "cursor: pointer;".
If I move the button inside the image block (top:90%; for example) it disappears. I have only one idea how to make it appear adding "z-index: 10; opacity: 0.2;" but it is not very good to have the button visible all the time.
Can someone help modyfying the code and css so that the play/pause button hides and appears like next/prev buttons do?
3 years 8 months ago #6
by Dmitry
autoplayButtonOutput: true,
autoplayText: ,
I managed to move the button to the bottom of the carousell by editing style.min.css file. You can modify ".tns-outer [aria-controls],.tns-outer [data-action]{cursor: pointer;}" string, adding "top:100%;position:absolute;display:block;left:49%;" after "cursor: pointer;".
If I move the button inside the image block (top:90%; for example) it disappears. I have only one idea how to make it appear adding "z-index: 10; opacity: 0.2;" but it is not very good to have the button visible all the time.
Can someone help modyfying the code and css so that the play/pause button hides and appears like next/prev buttons do?
Please Log in or Create an account to join the conversation.