Oh okay I see.
In my Elementor page, I’m using this code to get it working:
<style>.swiper-slide-image{cursor: pointer;} </style>
<script>
'use strict';
document.addEventListener('DOMContentLoaded', function () {
var filteredImages = document.querySelectorAll('.swiper-slide');
//Edit the links HERE
var links = [
'https://papangames.dk/reviews/?taverntales',
];
var _loope = function _loope(i) {
filteredImages[i].addEventListener('click', function () {
let linkid = filteredImages[i].getAttribute("data-swiper-slide-index");
location = links[linkid];
});
}
for (var i = 0; i < filteredImages.length; i++) {
_loope(i);
}
});
And
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($){
let desktoptitles = $('.premium-modal-trigger-img');
let strings = [
'?taverntales',
];
strings.forEach( (string,i) => {
if (window.location.href.indexOf(string) > -1) {
desktoptitles.eq(i).click();
$('html, body').animate({
scrollTop: desktoptitles.eq(0).offset().top - 100
},'slow');
} } );
}); });
</script>
Would something like this be possible to do too?
-
This reply was modified 2 years, 3 months ago by papangames.