0

With this code when I scroll the page the image zoom but I want to set the point where the zoom goes. Help me

$(document).ready(function () {
    $(window).scroll(function (){
        const scroll = $(window).scrollTop();
        $('.first-block img').css({
            transform: 'translate3d(-50%, -'+(scroll/50) +'%,0) scale('+(100 + scroll/6)/100+')' 
        })
    });
})
Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
  • Set the point where the zoom _go_? Also, begging for help won't work very well here. – Gabriel Apr 12 '20 at 17:08
  • @Gabriel Exactly I need to set the point where it is zoomed in, how can I do it? I'm new, where should I ask? – Albatroz 520 Apr 12 '20 at 17:57
  • can u create a jsfiddle please – mr. pc_coder Apr 12 '20 at 18:02
  • @Çağrı https://jsfiddle.net/Ljxdzrf8/2/ If you see with the fact that I cannot decide where the images are zoomed, they are all placed one on top of the other while what I wanted to do was that each image was zoomed in a different point and then exited the screen at a certain point to create an effect of "movement inside". – Albatroz 520 Apr 12 '20 at 18:14
  • Images are not working. Can u control again jsfiddle? – mr. pc_coder Apr 12 '20 at 18:25
  • @Çağrı idk, i can see it but in case I think you can change it, the important thing is the effect – Albatroz 520 Apr 12 '20 at 18:29

0 Answers0