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 trial
If you're loading the function last, wouldn't the warning message be shown until the Jquery function is ran to hide it?
Since the DOM is loading before the JS files, that warning message is going to show until the scripts are ran, right? So the warning class should be hidden by default I would imagine. Is that as simple as giving it a display:none as a default in the css?
Chris Shaw26,676 Points
If you want to be on the safe side using CSS can be a much better option but depending on your accessibility requirements you will need to be careful as a property such as
display with a value of
none will cause the element to become invisible to screen readers.
Hope that helps.