- Page specific code which gets executed only on a particular page
- The ability to create a CoffeeScript file and a CoffeeScript class which will get executed automatically when the page is loaded
- All we need to do is create a CoffeeScript class which follows our convention and executes without further configuration when we have a new page.
- The “always on” behavior
- And behavior triggered by a user action
Before you tackle these, you need to take care of certain things to help you stay organized.
- Class Scoping: This allows you more than just control access to the DOM through jQuery when you need to, but also provides you certain high-level styling classes to enable you to add page-specific CSS easily.