I am working on an ASP.NET MVC application and using jQuery.
I understand from various web resources that I should:
- Reference the google CDN for loading jQuery library. (No problem with that)
- Combine, minify and compress my javascript files into one file.
- NOT write JavaScript code in view files.
Now the problem is that on different views, I need to do different things when DOM is ready. For example lets assume I want to slideUp element with id ID1 on View1 and slideDown element with id ID2 on View2. How can I do this from single js file?