Jump to content

Draggable item check


JonattasJK
 Share

Recommended Posts

Helo, everyone.
i'm try to use this tutorial:
https://www.w3schools.com/howto/howto_js_draggable.asp

but a have some problem. This draggable item use the mouse events to move the item and not the ondrag event. Then, how can i check if my item is touching another item ? Please, help me.

I would like to allow the users move a item and if this item is over a specific element the users will to receive a gift.

Link to comment
Share on other sites

Try to make sure you have called right event on every  position like onMouseUp, onMouseDown.
Recheck your code ,if it doesn't solve it please provide your code so others can take a decent look into your problem.

Edited by ishan_shah
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
 Share

×
×
  • Create New...