Hello.
I am working on a comments system. I am using PHP + jQuery, I need to add the last comment to the top, i mean before all the DIV elements. E.G.
<div id="comment">
<div class="comment-3"></div>
<div class="comment-2"></div>
<div class="comment-1"></div>
</div>
So now I want to add the new <div class="comment-4"></div>
with jQuery to look like that.
<div id="comment">
<div class="comment-4"></div>
<div class="comment-3"></div>
<div class="comment-2"></div>
<div class="comment-1"></div>
</div>
Edit: NOTE: i am using..
$.ajax({
type: "POST", url: "ajax.php", cache : false, data: goData, dateType: "text",
success: function(data){
$("#comment").append(data);
$("#submit").attr({ disabled:false, value:"Shout it!" });
}
});
Thanks.