Slideshow hyperlink?

Hi I’m trying to make a slideshow where each image is a link. I’m new to coding so it’s all confusing. I tried this method but nothing appears )-: Here is my code in the before body section, I’m pretty sure I’m using the right data ID for each image (screenshot is slide 1 Data ID)

<script>
   
  setTimeout(function() {
// slide 1 
   $('[data-id=a728f75e-d933-4ab3-be72-78c53a752588]').css({"cursor":"pointer"}).on('click', function() {
   // use this to open link in same tab
   window.location.href = "https://readymag.website/u914815120/4856172/num/23001616/";
   });
    
    
   // slide 2 
   $('[data-id=42890ec4-09f4-43da-a661-ce5e7ad9c4d6]').css({"cursor":"pointer"}).on('click', function() {
   // use this to open link in same tab
   window.open("https://readymag.website/u914815120/4856172/num/22994300/", '_blank');
   });
    
    
   // slide 3 
   $('[data-id=a6cf9b16-f4d4-492e-9f7a-527b3ec697e6]').css({"cursor":"pointer"}).on('click', function() {
   // use this to open link in same tab
   window.open("https://readymag.website/u914815120/4856172/num/22994301/", '_blank');
   });
    
    
   // slide 4 
   $('[data-id=99ca622b-5945-4d70-b755-d4e7200933b5]').css({"cursor":"pointer"}).on('click', function() {
   // use this to open link in same tab
   window.open("https://www.instagram.com/j0.jimenez/", '_blank');
   });
    
    
 }, 1000);  

  
</script>```
![Screenshot 2024-08-14 at 11.34.27 PM|690x128](upload://A73F85E3BYjgPNwntiAo1a0wPMd.png)