Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Hide and show doesn't work at all on Firefox.
This is my code:
Pete Arevalo12,653 Points
Make sure you are including the jQuery library, also your code is not properly formatted, the semicolon is used at the end of each expression, also you have already grabbed the .
warning element, so there is no reason to do it twice if you are performing both actions on the same element in a sequence. It should look something like this:
here is a live example https://jsfiddle.net/m1d4suc0/1/
Bruce Morrison989 Points
I found when I opened console that there was an error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range."
The solution can be found here:
I'm not 100% confident that this caused the error, since subsequently removing that meta tag didn't revert the behavior (i.e. it continued to work correctly when I removed it). So... hopefully this is helpful and not a red herring :)
Pete Arevalo12,653 Points
If you are trying to include Jquery in jsfiddle, copy this cdn: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js and paste it in the external resources box show here http://imgur.com/KqUG6LX and press the blue plus sign to add. If you are looking to add it in your own personal project, just add it to the bottom of your index page, before the closing </body> tag. It should look like this <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
Treehouse, please, there is no the "best answer".
Dorota, unfortunately in the video an older version of jQuery is being used. Please try including the latest version of jQuery in your code and try again. The code below will link you the latest jQuery from the Google CDN.
works in chrome for me