Can I just put my javascript right next to my <div>
<p>If I have some javascript/jQuery acting on a particular div inside  tags (for an animation), can I just put the javascript (in a src="link-to-my-js.js" file) right next to my div?</p>

<p>I mean something like the following:</p>

<pre><code>&lt;body&gt;
&lt;div id="special"&gt;Some html&lt;/div&gt;
&lt;script type="text/javascript"&gt;javascript related to my div tag above...&lt;/script&gt;
&lt;/body&gt;
</code></pre>
