Hi!
I want to use a slideshow widget where each picture has a link to another page on the internet
I’m trying to add code, but it doesn’t work
P.S. I don’t remember what I tried to write in the code anymore
Hi!
I want to use a slideshow widget where each picture has a link to another page on the internet
I’m trying to add code, but it doesn’t work
P.S. I don’t remember what I tried to write in the code anymore
as you ans also others have asked this, here is the solution to setting up different links to slides of an gallery.
In the customcode tab, in the section “before ” paste into this:
<script>
setTimeout(function() {
// slide 1
$('[data-id=yourID]').css({"cursor":"pointer"}).on('click', function() {
// use this to open link in same tab
window.location.href = "https://www.readymag.com";
});
// slide 2
$('[data-id=yourID]').css({"cursor":"pointer"}).on('click', function() {
// use this to open link in new tab
window.open("https://www.google.com", '_blank');
});
// slide 3
$('[data-id=yourID]').css({"cursor":"pointer"}).on('click', function() {
// use this to open link in new tab
window.open("https://www.google.com", '_blank');
});
// slide 4
$('[data-id=yourID]').css({"cursor":"pointer"}).on('click', function() {
// use this to open link in new tab
window.open("https://www.google.com", '_blank');
});
}, 1000);
</script>
Paste in your data-ids of your slides you can find via the dev tools inspector.
Paste in your desired urls to link to.
Choose if you want the tab to be opened in a new or same tab.
You need to have atleast 4 different slides in the gallery to work properly. Otherwise RM will duplicate the slides and you have to also get the duplicates via the inspector.
Thank you for such a detailed answer!
I realized what my mistake was, I entered the data-id of the widget itself, not the picture, and it seems I still wrote the function a little incorrectly on my own…
Your code worked perfectly. Also thank you very much for the note about the 4 slides.
You are my hero
Same here. Thanks for sharing!