Im searching for a way to connect the current Image of a Swipe Gallery to a certain Text(div). If I move the Swipe Gallery forwards or backwards the text should change while matching the Image as well.
Any feedback will help.
Thanks
var gallery = document.getElementById('gwd-swipegallery_1');
var div = document.getElementById('my-div');
var text = {
1: "<img src='assets/headline1.png'>",
2: "<img src='assets/headline2.png'>",
3: "<img src='assets/headline3.png'>"
};
div.innerHTML = text[gallery.currentIndex];
};
Make sure you use innerHTML