-
AuthorPosts
-
February 20, 2014 at 6:03 pm #226921
I am using the Enfold theme and trying to create a gallery using the Layout Builder where the images automatically rotate, i.e. the larger image window advances through each of the images in the gallery. I do not see a configuration option to do this. Is there a way to make the images automatically advance, either through a configuration option or by adding some javascript to the page?
February 20, 2014 at 6:47 pm #226950Hi,
Open js/avia.js and look for line 962:
elements.prettyPhoto({ social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery:false, default_width: ww, default_height: wh});
Replace it by this:
elements.prettyPhoto({ social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery:false, default_width: ww, default_height: wh, autoplay_slideshow});
Regards,
JosueFebruary 20, 2014 at 11:00 pm #227093After making the change I am now getting the following error using Firebug
SyntaxError: invalid object initializer
if($.fn.prettyPhoto) elements.prettyPhoto({ social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery:false, default_width: ww, default_height: wh, autoplay_slideshow}); }
If I remove autoplay_slideshow and revert back to normal it works as expected.
Look up the prettyPhoto documentation it says to use autoplay_slideshow:true. When I changed it to this the gallery loads without error but it still doesn’t autoplay.
- This reply was modified 10 years, 9 months ago by Estland.
February 20, 2014 at 11:05 pm #227096Hi!
Try with this line instead:
elements.prettyPhoto({ social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery:false, default_width: ww, default_height: wh, autoplay_slideshow: true});
Cheers!
JosueFebruary 20, 2014 at 11:23 pm #227107Error went away with the new code but slideshow still does not autoplay
February 20, 2014 at 11:29 pm #227108I thought you were referring to the gallery when its open as a lightbox, hence the prettyPhoto fix. Regarding your current setup although it may be possible, we can’t help you with that because that would a require a much deeper customization to the theme files and that’s out of the scope of the support we can offer.
If you prefer you can request a customization quote here (WerkPress).
Best regards,
JosueSeptember 10, 2020 at 2:25 am #1244704I’m trying to add this same autoscroll function to a horizontal gallery
when I look at line 962 in the js/avia.js fieldworker i see different code that does not appear to be about the gallery
I’m using Version: 4.4.1I also tried to search prettyPhoto in this file and did not see that either
September 10, 2020 at 8:05 pm #1244991Hi mnydish,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
VictoriaSeptember 10, 2020 at 8:14 pm #1244995We had changed some code on another site in the JS file and it works great.
I just can’t remember what we had doneSeptember 14, 2020 at 7:25 pm #1245812Hi mnydish,
I am not aware of such a solution, especially for the older version of the theme, unfortunately. You can try to run a diff on the JavaScript files of those websites.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.