How "div" and $ slideToggle. Post

How "div" and $ slideToggle. Post

Hi guys I have a huge problem with jQuery can not solve.

So I'm trying to do this, I have a list of authors, an author by clicking on the recall data using db connection, and of course just below should open the div with the SlideToggle, with the results in the db already formed.

but since when I connect to mysql everything is ok .. The problem arises when I print the result. or have to press twice the author to display the text (open, close and reopen).

Then I thought to put the word "loading" when you press in order to give time to the script to load .. but nothing to be done then I will return the text ..

I place the code hoping for your help

<script type="text/javascript" language="JavaScript">
   var result_text;
   $(document).ready(function()   {
   $("a[name^='faq-']").click(function () {
   $("#"+this.name).slideToggle(600);
   $("#"+this.name).html("Loading..");
   $.post("libs/test.php", { username: this.name }, function(data){
  result_text = data;         
  //alert(data.name)
});
  //$("#"+this.name).load( result_text );
  //$("#"+this.name).slideToggle(300);
  $("#"+this.name).html(result_text)
});
});
</script>
</head>
<body>
<a name="faq-BROWN DAN" href="java-script:void();">Name</a>
<div id="faq-BROWN DAN" style="display:none"></div>
<a name="faq-LUDLOW P." href="java-script:void();">Name</a>
<div id="faq-LUDLOW P." style="display:none"></div>


Thank you for your help