fadeIn() with jQuery -


i have page can comment on specific item (kind ofdetailpage). want fade comment in jquery. problem fading in. not update post.

request.done(function (msg) {     if (msg.status == "success") {         var comment = msg.comment;         var name = msg.name;         var update = "<li class='description'>" + comment + "</li><li class='user'>" + name + "</li>";          $("#bug_list ul").prepend(update);         $("#bug_list ul li").hide();         $("#bug_list ul li").fadein(update);         $("#bug_message").val("");     } }); 

code on detailpage:

<div id="bug_list">     <ul id="listupdates">         <?php if(isset($comment)) $comment->getallcomments($id); ?></ul> </div> 

my function:

public function getallcomments($id) {     $db = new db();     $select = "select * tblcomments bug_id =".$id." order comment_id desc";      $result = $db - > conn - > query($select);     while ($row = mysqli_fetch_assoc($result)) {         echo "<li class='description'>".$row["comment_text"]."</li>";         echo "<li class='user'>".$row['name']."</li>";     } } 

try -

$("#bug_list ul li:first").hide(); $("#bug_list ul li:first").fadein(); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -