Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichal Janek
Front End Web Development Techdegree Graduate 30,654 PointsWhy use CSS modification in CSS file
Andrew himself said that the user should not download things he/she/apache helicopter will not be able to use. If for example, the user won't be able to use Javascript/jQuery, yet Andrew sets the initial values for #overlay in CSS file not in app.js. My point is why is the Teacher not setting this with jQuery in app.js file. By this logic, we did not need to create div in app.js with jQuery but we could create it in HTML - the same thing he himself said we should not do because the user should not be downloading stuff he/she will not be using.
If the user will not be able to see JS/jQuery because of some problem - there will never be a jQUery object and thus the CSS for it will never be used. Suddenly we have redundant CSS modifications in a CSS file never to be seen.
Same goes for id="'myGallery".
My point is if we are learning about JS/jQuery we should not manipulate HTML/CSS files on their own. Only through JS or jQuery. Maybe we are not allowed to change it by our client? We should be taught to think like that, should not we?
A X
12,842 PointsA X
12,842 PointsMichal Janek : I was wondering a similar question, thanks for asking this. I'll flag this to see what people respond with :)