My post's comments append only work for 1 post but i want this to be work on every post

<body>
<input type="text" id="postInt" /><button id="postBut">Post</button>
<div id="postAppend"></div>
</body>
$("#postBut").click(function () {
var postIntVal = $("#postInt").val();
$("#postAppend").append(
"<div id='postContainer'><p>" +
postIntVal +
"</p><input class='postCmntInt' /><button class='cmntBtn'>Comment</button><div class='postCmnts'></div>"
);
$(document).on("click", ".cmntBtn", function () {
var postCmntInVal = $(".postCmntInt").val();
$(".postCmntInt").after("<p>" + postCmntInVal + "</p>");
$(".postCmntInt").val("");
});
$("#postInt").val("");
});