What's the difference between using Drupal's jQuery library and adding it in html.tpl.php? I'm recoding one site (D7) where I stumbled upon statically added jquery (using a script tag inside html.tpl.php that pulls jquery library from google CDN). I installed "jQuery CDN" module that does the same and expected that when I loose statically added script tag everything would stay the same, but the menu and slider don't work (menu is implemented using some internal jsddmenu.js file, also slider using slides.jquery.js). What's the difference between those two implementations, when both of them add:

&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;


to the html code?
Its better to add javascript using your:
a) theme's .info file using scripts[] = "some/filename.js"
b) in the theme dynamically ... such as mytheme_node_view() { drupal_add_js('file', 'some/filename.js'); }
c) or in a custom module ... (similar to above)

depending entirely on your site's needs.

the reason its better to approach this this way is:
1) the theme's scripts[] array is cacheable and will attach the javascript to every page.
2) dynamically attaching it allows the script to be used only when needed.
3) you don't force the client to load anything they don't need.
4) if its attached in one of the above ways, it can be minified if needed --- allowing the client to download one big javascript file instead of a dozen separate ones.