I am making a post-comment page and I am facing a problem in making the comments unordered list slideToggle
my code-
$开发者_JAVA技巧("#ccoomm").click(function() {
var pid = $(this).attr("class");
var text = $(".comment" + pid).val();
var email = $("#hidden").val();
var data = "pid=" + pid + "&text=" + text + "&email=" + email;
$("#flash").show();
$("#flash").fadeIn(500).html('<img src="wamp.gif" /> Loading...');
$.ajax({
    type: "POST",
    url: "comments.php",
    data: data,
    cache: false,
    success: function(html) {
        $("#"+pid).append(html);
        $("#flash").fadeOut(100);
        $("#text").val("");
        $(".comments"+pid).slideToggle(100);
        $(this).toggleClass("active");
    }
});
});
Maybe try
$('.'+pid).append(html);
instead of
$("#"+pid).append(html);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论