I have a problem with $( "#MiID" ).remove(); function.
I use:
$(document).ready(function () {
$( "#mydiv" ).remove();
});
In firebug, the div is removed, but if I click View Page Source the div appears there.
How can I resolve the problem?
Why in firebug was remove but in DOM not?
UPDATE: The problem is Google . Google reads the contents of the div and google uses the " h1 " of "div" as a key word of my website . This div is repeated on every page of my website but do not know can correct that problem. I can just hide and unhide the div
);, if it is not in your code, kindly remove it.Why in firebug was remove but in DOM not?It's removed from DOM. View Page Source doesn't reflect actual DOM state.if ($("#mydiv").length > 0)