I might be talking out my butt, but maybe create a div inside the one with
the click handler and load into that.
Then the click event is preserved.

Also check out the Live JQuery plugin.  It can add events to dynamically
loaded elements.

Glen

On Dec 4, 2007 3:26 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I am sure this is a pretty basic question but I have the following
> problem.
> When I try to load content into a div container with AJAX, the content
> just loads for a split second and disappears or unloads itself again.
> It seems that the click event only works when the actual click is
> performed. Do I have to use another event or what is the problem?
>
> $(document).ready(function() {
>
>   $("#mylink").click(function(){
>      $("#mydiv").load("content.html");
>   });
>
> });
>
> Thanks.
>
>
> alex
>

Reply via email to