Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • But why did this used to work? That's what I'm confused on. This used to work fine - I've added an ID to the element I'm trying to remove and passed that in the arguments for .remove() but instead of erroring, it just does nothing. I'll give this a shot. Commented May 2, 2011 at 15:22
  • Couldn't we just use $(selectedElement).remove(); ? Commented May 2, 2011 at 15:27
  • This is it. Gah. Thanks. I just have no idea why this used to work and has subsequently stopped, in all versions of jQuery. Commented May 2, 2011 at 15:29