Javascript - How do you organize this mess?!?
As Javascript Frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem...

**How in the world do you keep this organized?**

- Put all your handlers in one spot and write functions for all the events?
- Create function/classes to wrap all your functionality?
- Break up scripts into separate files even if they all go together?
- Write like crazy and just hope it works out for the best?
- Give up and get a new career?

I mention jQuery, but it's really any Javascript in general. I'm finding that as lines upon lines begin to pile up, it gets harder to manage the script files or find what you are looking for. Quite possibly the biggest propblems I've found is there is so many ways to do the same thing, it's hard to know which one is best. 

Is there any general recommendations on the best way to keep your **.js** files as nice and neat as the rest of your application? Or is this just a matter of IDE? Is there a better option out there?
Javascript - How do you organize this mess?!?
===

As Javascript Frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem...

**How in the world do you keep this organized?**

- Put all your handlers in one spot and write functions for all the events?
- Create function/classes to wrap all your functionality?
- Break up scripts into separate files even if they all go together?
- Write like crazy and just hope it works out for the best?
- Give up and get a new career?

I mention jQuery, but it's really any Javascript in general. I'm finding that as lines upon lines begin to pile up, it gets harder to manage the script files or find what you are looking for. Quite possibly the biggest propblems I've found is there is so many ways to do the same thing, it's hard to know which one is best. 

Is there any general recommendations on the best way to keep your **.js** files as nice and neat as the rest of your application? Or is this just a matter of IDE? Is there a better option out there?