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 trialRoald Jurrian Kamman
Front End Web Development Techdegree Graduate 15,544 PointsDo you think people will still turn off JavaScript 2-5 years from now?
It seems kind of ridiculous. What's the percentage of users actually experiencing this issue? 0.1%? Implementing this is only worth it for companies as big as google. if someone is browsing on a laptop that runs a browser that old from the 3rd world it's not even going to be a decent prospect for commercial purposes.
There are better methods for keeping people from visiting certain websites.
I just don't see where I would realistically implement this.
Roald Jurrian Kamman
Front End Web Development Techdegree Graduate 15,544 PointsJQuery basics adding new elements to the DOM. Teaching this method in case JavaScript is turned off.
1 Answer
Steven Parker
231,269 PointsI think you misunderstand how jQuery works. jQuery is a JavaScript library. It extends but does not replace JavaScript.
If you turn off JavaScript in your browser, then jQuery will also stop working.
Roald Jurrian Kamman
Front End Web Development Techdegree Graduate 15,544 PointsThe video appends() a html tag creating it within the JS file in order to make sure that element is still there if JS is turned off. Which doesn't make a lot of sense to begin with. another post on this: https://teamtreehouse.com/community/if-javascript-is-disabled-wouldnt-any-file-ending-in-js-automatically-be-ignored
original video here: (I forgot I could simply link to it... good morning.)https://teamtreehouse.com/library/adding-new-elements-to-the-dom
and finally, another post where you responded: https://teamtreehouse.com/community/i-did-not-understand-why-we-are-creating-a-button-in-this-way
Steven Parker
231,269 PointsThe jQuery code is used to add a button only if JavaScript is enabled. Later in the video, the instructor points out that "if JavaScript is disabled our users will still be able to view the spoiler, but won't see a button that doesn't work."
This is also demonstrated in the video about 3 minutes in.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsWhat's the "this" you are referring to? If it's in the video, can you give a time index?