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+')' 
        })
    });
})
6
  • Set the point where the zoom go? Also, begging for help won't work very well here. Commented Apr 12, 2020 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? Commented Apr 12, 2020 at 17:57
  • can u create a jsfiddle please Commented Apr 12, 2020 at 18:02
  • @Çağrı 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". Commented Apr 12, 2020 at 18:14
  • Images are not working. Can u control again jsfiddle? Commented Apr 12, 2020 at 18:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.