Brian,

We've taken the approach with two scopes: application and page. The acronym for our application is vv and we've gotten into the habbit of prefixing most everything with it. It's worked out well thus far.

Our vv_app.js is actually built by ant which basically concatenates a number of files and does some basic source cleaning (stripping out comments, tabs, etc)

Init process:
[vv_app.js]
$(document).load(vv_init);
vv_init() {
   // do plugin initialization
   if (typeof(vv_p_init) == 'function') {
      vv_p_init();
   }
}

[vv_p_pageName.js]
vv_p_init() {
}

Example js includes:
[pageName.html]
_javascript_ src=""
_javascript_ src="">

This is a rough brain dump, but I hope it helps some.

-js



On 9/20/06, Brian Litzinger <[EMAIL PROTECTED]> wrote:

I'm in the habit of using a global.js file where I put all my custom scripts,
and in that I have a function called global(), then just call that within
the document.ready function on each page. This lets me put any jQuery code
that I want run on each page in one place, and keep the head of my html
pages cleaner. Dunno if thats what you were looking for, but it helps me
keep things as seperated as possible.

--
View this message in context: http://www.nabble.com/Structuring-jQuery-code-in-large-projects-tf2304957.html#a6407846
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to