How to redeclar a function after loading new content with Ajax?

0

I need to assign to new elements loaded via an ajax request this function bloginfos () . Is there a more elegant and professional way in my code to do this?

$("#frm_busca_projetos").on("change", function(){
    var termo = $("#termio").val();

    $.ajax({
        url: CAMINHO_JAVASCRIPTI+'/projetos/ajaxgetprojects',
        type: 'POST',
        dataType: 'html',
        data: {termo:termo, categorias:categorias, publicado:publicado, midia:midia},
        success: function(retorno) {
            $("#allinprojects").fadeOut(400, function() {
                $("html, body").animate({scrollTop: 0}, 800);
                $(this).empty().append(retorno);
                $(this).fadeIn(400);
                bloginfos();
            });
        }
    });
}); 
    
asked by anonymous 21.11.2016 / 02:56

0 answers