View Full Version : Removing Element from jQuery

06-04-2008, 12:50 AM
I need to remove an element - properly. Using $('#id').remove() removes the element from the dom but not from jQuery - but I need to get rid of it completely and I can't find any way to do that.

Basically I'm creating a tooltip script and if I try to show and hide the div in its current place, the positioning is relative to its parent's container, but the co-ordinates I have are relative to the viewport - using $('body').append works in FF but in IE, it still uses the old copy of the item that exists in jQuery (even after removing it)

I've also tried cloning the element but the same problem exists - 2 items with the same id in jQuery - there must be a solution to this problem?

06-10-2008, 05:21 PM
You many not be removing the right object, have you tried removing the parent? Could you post up some code?