I need to remove or modify elements created by OpenLayers library. If I delete it, I cannot see it in the console.debug anymore if displayed by id, but they are still present in the browser.
console.debug($("#OpenLayers_Geometry_Point_85"));
Perfect, I can see the output in the console. When I hover over it, the element in the browser gets highlighted.
$("#OpenLayers_Geometry_Point_85").remove();
An attempt to remove the element, it behaves essentially in the same way as:
var img = document.getElementById("OpenLayers_Geometry_Point_85");
img.parentNode.removeChild(img);
console.debug($("#OpenLayers_Geometry_Point_85"));
Now the second output in console.debug is different, it is empty, so it has been deleted. However, in the browser I can still see it. Hovering over the first output does not highlight anything anymore. When inspecting the element, it shows me the code that has been removed! Or is it still there?
Please, note, that I have checked for duplicates. I am performing the operation after the document has been fully loaded. The element is of SVG type, but this should not matter or does it?
Question: How can I remove the element from the browser completely?