organise javascript code based on page
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-05-10T20:20:31Z
Indexed on
2010/05/10
20:24 UTC
Read the original article
Hit count: 335
jQuery
|JavaScript
Hi I am relatively new to javascript development. At the moment I have a single javascript file with lots of little misc bits of code that get called in different part of the website. For example I have an event handler for some google maps stuff that is only called on 1 single page, I have some validation stuff for my contact page etc etc. My question, is how best to organise this code - given that each page only requires very little code but its different and specific per page?
Oh, I am using jquery if that makes a difference.
© Stack Overflow or respective owner