jquery remove created elements, children included
<p>I want to have this situation where if someone hover's a link, an element should be created dynamically with information about that link.</p>

<p>I know that there are some standard jquery scrips available for that, but for my understanding of jquery i want to make it myself.</p>

<p>I'll show the element like this:</p>

<p><pre><code>
    $(".event-date").live("mouseover",function(e){
        var event = e || window.event; 
        event.preventDefault();
        $(this).append("&lt;div id='showEventInfoWrap'>&lt;div id='closeEventInfo'>Close&lt;/div>&lt;div id='showEventInfo'>&lt;/div>&lt;/div>");
        $("#showEventInfo").load("event-info.php");
    });
</pre></code></p>

<p>I use <code>live()</code> because the calendar is displayed in an <code>&lt;div&gt;</code> element, which changes when the users navigate through the months.</p>

<p>The problem is with hiding the div when:
a) a user clicks the 'close' link; or 
b) a user hovers away from the appeared element.</p>

<p>I tried any of the following options, but neither of them worked:</p>

<p><pre><code>
    $("#closeEventInfo").live("click",function(e){
        $(this).parent().attr("id").remove();
        $("#showEventInfoWrap").remove();
        $("#showEventInfoWrap").children().remove();
        $("#showEventInfoWrap").add("#closeEventInfo").add("#showEventInfo").remove();
    });
</pre></code></p>

<p>I also tried <code>empty()</code> instead of <code>remove()</code> but without any result.</p>

<p>Does anybody maybe know what i'm doing wrong?</p>
