Hello) I need to determine when the #drag element will be moved to the #drop element, but I have a problem with the condition. Code: http://jsfiddle.net/hW23j/

Here is a section of code in which, I think, the problem itself:

if((e.pageX >= dropX) && (e.pageX < (dropX + dropW)) && (e.pageY >= dropY) && (e.pageY <= (dropY + dropH))) 

    1 answer 1

    The problem is that dropX and your other variables derived from the style contain a px suffix. Make parseInt (dropX), everything will work. your example

    • Damn .. my inconvenience will ruin me) Thank you very much) - LightShock