slideDown New Query
slideDown New Query
Hi All,
I have a jQuery function that, when a link is clicked, a query is made to the database, via AJAX, and a new record is appended to my current HTML.
Now, everything is working fine, however, I cannot get the new "record" to slideDown. It is appended fine, but I would like it to "slideDown" if possible. Here's what I am currently using (which, again, works fine, but just doesn't slideDown).
-
$('#moreAnnounce').click(function(event) {
event.preventDefault();
var announceID = $(".record:last").attr('id').replace(/record-/ig, "");
$.ajax({
type: "POST",
url: "announce-response.php",
data: "last="+announceID,
success: function(html){
$("#statuses").append(html);
$(".record:last").slideDown("slow");
}
});
});
And here's what my PHP looks like:
-
<div id="statuses">
<div id="record-292" class="record">Test Here</div>
<div id="record-291" class="record">Test Again</div>
</div>
<a id="moreAnnounce" href="#">Show older posts...</a>
Any ideas on how I can get the "slideDown" to work when a new query is made? Thanks!