0

Strictly from a performance standpoint, what are the differences between remove(), hide() and detach()?

If I want to permanently make an element go away on the page, is remove() or hide() even marginally faster than the other?

2
Contributors
2
Replies
25
Views
2 Years
Discussion Span
Last Post by Dani
0

is remove() or hide() even marginally faster than the other?

Theoretically hide should be faster. Run a test and find out.

0

I've been using hide() forever (when doing various things such as hitting 'Delete' when browsing your list of private messages and making it go away in the list AJAXy).

I was just wondering if anyone knew if there was some advantage to using remove() and decreasing the size of the DOM as compared to adding what amounts to a CSS display:none.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.