elem.parentNode is null

elem.parentNode is null


Hello All.
i am usgin jquery ui tab system.
when i remove a tab i got this error :
<div class="errorTitle focusRow subLogRow">elem.parentNode is null</div><div class="errorSourceBox errorSource-exec focusRow subLogRow">
<img src="chrome://firebug/content/blank.gif" title="Break on this error" class="errorBreak a11yFocus"><a class="errorSource a11yFocus"> siblings: function(elem){return jQuery....ing(elem.parentNode.firstChild,elem);},\n
What is the problem.
My code is :
<br style="background-color: rgb(255, 0, 0); color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 255, 255); color: rgb(255, 0, 0);">$(".ui-tabs-nav").parent().children("ul").children("li").children("a[href='#"+tab_id+"']").parent().remove();
<font color="#000000">it removes my <li> but also gives this error. I could not understand why. i have removed inside <li> firstly. i am not gettig any error. removing class, add id .. . no problem.
but when i call "remove" func. for <li> i got error above.
Thanks.
</font>
</span></a></div>