jQuery/JS for different pages - best way of doing this?
<p>Apologies if this is a silly question, and I'm not even sure of the best way of wording it...</p>

<p>At the moment I have a site with maybe 20+ different uses of jQuery, all varying from page to page. I'm just wondering what the best way is to store this code?</p>

<ul>
<li>Everything in one big jquery.myfunctions.js file? And check if the element exists for each statement?</li>
<li>Embed script tags into each individual page?</li>
<li>Use PHP to deliver different content into script tags kinda like the above?</li>
<li>Separate .js files per page? ims I don't like the sound of this at all</li>
</ul>

<p>To be honest, I'm not even sure if jQuery does this for you, so it's okay to have multiple <code>$('#whatever').function()</code> loaded onto each page without any noticeable performance issues?</p>

<p>Any advice on this would be fantastic, probably a silly question but I want to do things the 'proper' way you know?</p>

<p>Thanks :-)</p>
