Organize jQuery code without a framework
Here are two rules I adopted from frameworks for my jQuery code:
- Write isolated pieces of code that only control a specific element on the page. I will call these pieces controllers for convenience.
- Define behavior of a controller only by attaching event...
Continue reading →