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.

JavaScript jQuery Basics Working with jQuery Collections Stopping the Browser's Default Behavior

Nathan Marshall
Nathan Marshall
6,019 Points

General Jquery Question

So correct me if im wrong, but from what I understand appending something to the DOM should be used whenever something is interactive on a site using Jquery/Javascript? So that when we dont have Jquery/Javascript available the site the interactive feature doesnt show?

1 Answer

Steven Parker
Steven Parker
220,925 Points

Depending on the site's purpose, you may not need to completely conceal the missing feature, but you'd want to construct the page so that if script execution was disabled, the page would still make sense.

If the missing element was of significant value to the page you might want to display something like a "Please enable JavaScript to see this page's full content" message.

Nathan Marshall
Nathan Marshall
6,019 Points

Thank you, I just wanted to make sure that my understanding was along the right lines. This helped.