Load external javascript files
<p>I have some trouble with loading external javascript files inside my WordPress theme.
Use the following markup:</p>

<pre><code>&lt;script src="&lt;?php bloginfo('template_directory'); ?&gt;/js/jquery-1.8.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="&lt;?php bloginfo('template_directory'); ?&gt;/js/custom.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>The above code is set inside the <code>&lt;head&gt;</code> of my <code>header.php</code> file of my WordPress theme.</p>

<p>Why is this not working? Or should I also use the following for link external scripts?</p>

<pre><code>function my_scripts() {
    wp_enqueue_script( 'my-sweet-script', get_bloginfo('template_directory') . '/script.js', array('jquery') );
}
</code></pre>

<p>Thank you.
Casper</p>
