Jump to content

Draggable item check


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...