Jump to content
GreenSock

kovle

How to separating parent and child from draggable ?

Go to solution Solved by mvaneijgen,

Recommended Posts

<div class="Drag Parent">

            <div class="Drag Child">

</div>

 

Even if I drag parents div, I want my child div to stay still How do I do this?
 
I don't want the child div to be dragged/moved, and I want only parents to be dragged and moved
Link to comment
Share on other sites

  • Solution

Hi @kovle welcome to the forum!

 

You don't. Or you have to do some really complicated animation, to make it so that when you move the parent div you animate the child div to the opposite direction. 

 

This has nothing to do with GSAP, but is just how the web works. If you translate the same setup with CSS, your child div will also move. 

  • Like 1
Link to comment
Share on other sites

8 minutes ago, mvaneijgen said:

Hi @kovle welcome to the forum!

 

You don't. Or you have to do some really complicated animation, to make it so that when you move the parent div you animate the child div to the opposite direction. 

 

This has nothing to do with GSAP, but is just how the web works. If you translate the same setup with CSS, your child div will also move. 

thats sad, but thanks for answer!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×