I have couple of elements that are boxes, i want when i drag one element above some of the boxes, to get the specific id of the box.I want to get only these id’s that my dragging element is being above them.So how can i do such a thing ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you can use JQuery and JQueryUI please take a look at:
http://jqueryui.com/demos/droppable/
They have demos and example codes that will probably solve your problems.
Look at this specific example: http://jqueryui.com/demos/droppable/#accepted-elements
You can use the over event to notify you when a a dragged item comes in a element:
If you run this on Chrome you can check on the console when the event is triggered, and what information it contains.