Take the 2-minute tour ×

While this works:


This does not:


What is the problem with the latter? I only have changed this:

var dropZone = document.getElementById('drop_zone');
dropZone.addEventListener('dragover', handleDragOver, false);
dropZone.addEventListener('drop', handleFileSelect, false); 

To this:

$('#drop_zone).bind('dragover', handleDragOver, false);
$('#drop_zone).bind('drop', handleFileSelect, false); 
share|improve this question
Why do you keep logging in with a different account? Log in with the same account and you can comment on your own questions. –  Nick Craver Nov 24 '10 at 10:17
(re quotes, from the OP) "it is just copy-paste failure" - well, I wonder what other copy-paste failures are lurking. I don't think we can diagnose without the actual code. –  Marc Gravell Nov 24 '10 at 10:35
add comment

1 Answer

Your syntax is invalid, you're missing some closing quotes '.

Also, look at the documentation for the possible .bind syntax:

.bind( eventType, [ eventData ], handler(eventObject) )
.bind( eventType, [ eventData ], false )

You'll have to use $('#drop_zone').bind('dragover', handleDragOver), otherwise handleDragOver is interpreted to be the eventData parameter, not as the handler parameter.

share|improve this answer
add comment

Your Answer


