Ajax call not working within click handler function?

Ajax call not working within click handler function?

I have the following code:

  1. $(document).ready(function(){
  2.     $('#link').click(function() {
  3.         alert('Clicked!');
            $('#content').load('dialogs/load/content', function() {});
        });


  4. });
The link is a normal link that is not dynamically created. The alert works. I know the problem is not the Ajax call because this works just fine:

  1. $(document).ready(function(){
  2.     $('#content').load('dialogs/load/content', function() {});

  3.     $('#link').click(function() {

  4.       alert('Clicked!');
  5.     });

  6. });
It only breaks when located inside the click handler. It does not return response headers or a response. Is there something about event handlers and ajax that I'm missing?