Defining lots of javascript for different pages - best way?
Hi guys,
Sorry if this is a silly question, and I'm not even sure of the best way of wording it...
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?
- Everything in one big jquery.myfunctions.js file? And check if the element exists for each statement?
- Embed script tags into each page?
- Use PHP to deliver different content into script tags kinda like the above?
- Separate .js files per page? ims I don't like the sound of this at all
Any advice on this would be fantastic, probably a silly question but I want to do things the 'proper' way you know?
Thanks :-)