Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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, 2 months ago by Kris1711.
    #505855

    Hi 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,
    Rikard

    #506351

    Yes no worries at all,

    cheers!

    #506423

    Hi!

    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,
    Yigit

    #506468

    Hi 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 :)

    #506786

    Hi!

    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!
    Ismael

    #506877

    That will work fine, thanks guys much appreciated!

    • This reply was modified 9 years, 2 months ago by Kris1711.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Forcing Arrows on the easy slider’ is closed to new replies.