kovle Posted September 23, 2022 Share Posted September 23, 2022 <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 More sharing options...
Solution mvaneijgen Posted September 23, 2022 Solution Share Posted September 23, 2022 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. 1 Link to comment Share on other sites More sharing options...
kovle Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now