Javascript: How to write this drop event in jQuery?
<p>This works:</p>

<pre><code>var picdrag = document.getElementById('picdrag');
picdrag.addEventListener('drop', picSelect, false);
function picSelect(e) {
    var pics = e.dataTransfer.files;
}
</code></pre>

<p>This doesn't:</p>

<pre><code>$('#picdrag').on('drop', function(e) {picSelect(e);});
function picSelect(e) {
    var pics = e.dataTransfer.files;
}
</code></pre>

<p>because it reports an error <code>'e.dataTransfer is undefined'</code>. I hate it when I don't know why something works or doesn't work. This is specific to the drop event, like jQuery handles it differently.</p>
