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!
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
Jenna Malone7,173 Points
Why not just use .hide(); ?
So previously we used .hide(); to hide the text box that flew in in the first project. I am just wondering why for this project we want to actually remove it from the DOM instead of just hiding it? Is there a best practices thing that I am missing here, or are we just removing it from the DOM because thats what the instructor specifically told us to do?
David Gross19,443 Points
hide() sets the matched elements' CSS display property to none.
remove() removes the matched elements from the DOM.