-
AuthorPosts
-
September 18, 2015 at 5:03 pm #505690
Hi guys, I’ve added a js script to a huge website which has different amounts of sliders on different pages.
Problem is, a majority of the pages only have 1 slider, so although there is now two sliders because of my script, either the original image doesn’t load (due to autoplay not being set) and the arrows aren’t there either to go between slides. Is there some way to force the arrows to appear and all slides to autoplay?
Cheers!
- This topic was modified 9 years, 3 months ago by Kris1711.
September 19, 2015 at 5:59 am #505855Hi Kris1711!
Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply. Also, please post the code you are using in a code block since it’s rendering in your first post.
Thanks,
RikardSeptember 21, 2015 at 11:52 am #506351Yes no worries at all,
cheers!
September 21, 2015 at 2:17 pm #506423Hi!
Can you please turn on custom CSS field for ALB elements – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and give your sliders a custom class and then change your code to following one
$(document).ready(function() { $( ".slide-1" ).before( "<li class=' slide-0 ' ><div data-rel='slideshow-1' class='avia-slide-wrap' ><img src='http://mhcc.co/img/school-closure.jpg' width='1030' height='242' alt='' /></div></li>" ); });
Regards,
YigitSeptember 21, 2015 at 3:11 pm #506468Hi Yigit,
I did everything you said (tested with 1 slide) but it didn’t autoplay or add the arrows?
Is there a specific class I need to set the slider to for this to work?
Alternatively I could go through each and every page and set them to autoplay, but if I did that I’d still have the problem where the slider thinks there is only 1 slide, so it doesn’t show the arrows?
Is there not a function or something which can set them all to autoplay and to auto think there is more than 1 slide so it forces the arrows to show?
Thanks :)
September 22, 2015 at 6:16 am #506786Hi!
If you want to force the arrows to display, modify config-templatebuilder > avia-shortcodes > slideshow.php. Look for this code around line 532:
if($this->slide_count > 1) { $html .= $this->slide_navigation_arrows(); $html .= $this->slide_navigation_dots(); }
.. replace it with:
if($this->slide_count > 0) { $html .= $this->slide_navigation_arrows(); $html .= $this->slide_navigation_dots(); }
We replace “1” with “0”.
Cheers!
IsmaelSeptember 22, 2015 at 10:33 am #506877That will work fine, thanks guys much appreciated!
- This reply was modified 9 years, 3 months ago by Kris1711.
-
AuthorPosts
- The topic ‘Forcing Arrows on the easy slider’ is closed to new replies.