General Javascript Syntax Query
<p>I am new to Javascript and its syntaxes. Hope you all can help clear my doubts.</p>

<p>Q1)</p>

<pre><code>&lt;script&gt;
 $(document).ready(function() {...}
&lt;/script&gt;
</code></pre>

<p>What does the "$(document...." part mean? I thought a function is started with</p>

<pre><code>function(var){...} 
</code></pre>

<p>? What the Difference? and when do i use "$" symbol?</p>

<p>Q2)</p>

<p>Js code</p>

<pre><code>$('#dropzone').on('dragover', function(e) {
                e.preventDefault();
                e.stopPropagation();
                e.originalEvent.dataTransfer.dropEffect = 'copy';
            });
</code></pre>

<p>Html code</p>

<pre><code>  &lt;div id="dropzone"&gt;
        &lt;span&gt;Drop an image file here&lt;/span&gt;
        &lt;canvas&gt;&lt;/canvas&gt;
    &lt;/div&gt;
</code></pre>

<p>Based on the above, I see that "#dropzone" is linked to the "div id='dropzone'", correct? and i dont get the part of " function(e)"? what role does puting a function at that spot denotes?</p>

<p>Thank For your replies :)</p>