So far, I’ve come to this piece of javascript that kinda works:
$('.page.gallery .main .thumbnails li a.thumbnail').click(function(event){
event.preventDefault();
var bgimage = $(this).attr('href');
var bgalt = $(this).children("img").attr('alt');
myatu_bgm.addTopImage(
"{% if opacity < 100 %}-moz-opacity:.{{ opacity }};filter:alpha(opacity={{ opacity }});opacity:.{{ opacity }};{% endif %}",
function() {
if ((typeof myatu_bgm !== "undefined") && (myatu_bgm.initial_ease_in === "true")) {
$(this).fadeIn("slow")
} else {
$(this).show()
}
myatu_bgm.switchBackground(); // Works only with timer slideshow
}
)
});
This script does add the correct image into the myatu_bgm_img_group div when clicking on the corresponding thumbnail and the background does change accordingly!
However, this only works when selecting the Select an image: Every 10 seconds option in the settings. Besides that, the timer of the slideshow continues after manually switching the background.
Another issue is that the previous images aren’t removed from the myatu_bgm_img_group div when adding one by clicking a thumbnail.
What I actually want is that no background is set yet (or if there’s no other option, the random option is active) and that visitors can set the background themselves for the rest of their session by clicking the thumbnails.
Anyone has an idea on how to achieve this?
Thanks!