[jQuery] Calling jquery in an other function?

[jQuery] Calling jquery in an other function?


Hi,
I'm using AJAX to update data in my database. Right now I'm using this
code:
[code]
        function accept(id, action){
            var indicator = document.getElementById("indicator").style;
            var naamInput = document.getElementById('naam');
     var xmlhttp = makeXmlHttp();
            var data = 'id=' +id +'&action='+ action;
            id = id;
            window.alert(id);
     xmlhttp.open("POST", "pagina.php", true);
     xmlhttp.setRequestHeader("Content-type", "application/x-www-
form-urlencoded");
     xmlhttp.onreadystatechange = function() {
     if(xmlhttp.readyState == 4){
                    indicator.display = "none";
                    document.getElementById("results").innerHTML =
xmlhttp.responseText;
                    curDiv = document.getElementById('info'+id);
                    curDiv.style.display = "none";
     }
        }
[/code]
As you can see in the last part of the code, I use display to hide the
data I just updated. Now I would like to use jQuery to make it a litte
interesting so it would fade out or just slideUp. Therefore I just the
following:
[code]
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("a").click(function () {
     $("#info"+id).slideUp("slow");
});
});
</script>
[/code]
For some reason I can't get the ID of the link I just updated. Any
Idea how to do this?
Thx in advance. :)