[jQuery] The click event and Ajax (Problem)

[jQuery] The click event and Ajax (Problem)


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














    • Topic Participants

    • glen