I have a problem here that is as follows. I have a timeline that displays some posts, for ajax I load more content and make an append, the new items that are displayed do not get the slideToggle. I've manually added the script again on the page that is sending the content by ajax and slideToggle works, the problem is this, when it opens, it already closes quickly and does not let the div on the display, does anyone know how to solve it? I already put display none and it did not solve.
$("#maisPostagens").click(function (event) {
event.preventDefault();
$("#carregando").toggle();
var posts = $(".postagens:last").attr("lang");
if (posts) {
var url = '_funControllers/exibePostagensLinhaDoTempo.php?posts=' + posts;
setTimeout(function () {
$.get(url, function (dataReturn) {
$("#carregando").toggle();
$(".auto").append(dataReturn);
});
}, 1000);
}
});
//efeito de aparecer e esconder divs de Comentários
$(".auto .postagens .comentarios .linkComentario").on("click", function (event) {
event.preventDefault();
$(this).parents('.externa').find('.comentarioPost').slideToggle();
});
Thank you