I have a little problem here. ¿How i can manipulate a dynamically generated html, in Jquery?

I have a function like:

```
generatesomething : function(DestinationID,data){
    result = $.DoSomething(data)
    $('#'+Destinationid).html(data);
}

```

The script, in other point, receive through ajax an array. Naturally, I will iterate the array like: 

```
$.each(response, function(key, value){
    ThisHtml = '<div id="div'+key'"></div>';
    $('#MyPlaceHolderDiv').html(ThisHTML)
    //In this point, i really need to call my first function
    $.generatesomething('div'+key',data)
    //But not works!!!!
}

```

How i can manipulated the generated div using my function?

Thanks in advance!
------------------

Edit: in a try to clarify my question, i will paste the exact functions. 

I made this function. Please do not laugh at my code, I am newbie in jquery.

jQuery.fn.extend({
 /*funciones Generales*/ 

```
piegraph : function(GraficoDestino,tipo,arrayDatos,dato1,dato2,tooltiptemplate,labeltemplate){
    var dataPoints = [];
    $.each(arrayDatos, function(key, value){
        var temporal = {};
        temporal.label = value[dato1];
        temporal.y = parseInt(value[dato2]);
        dataPoints.push(temporal);
    });
    var opciones = {

        animationEnabled : true,
        data : [{
            type : tipo,
            startAngle : 0,
            toolTipContent : tooltiptemplate,
            indexLabel : labeltemplate,
            dataPoints : dataPoints,
        }]

    };
    $('#' + GraficoDestino).CanvasJSChart(opciones);
}

```

This function works pretty well... if i can give it the destination div to it.

In other part of my script, i have a ajax call: 

```
Generadisco: function(){
    var datos = {
        "accion":"generadisco"
    };
    $.ajax({   
        type: "POST",
        url: "blahblah.php",
        data: datos,
        dataType: "json",
        success:function(response){

            $.each(response, function(key, value){
                esteHTML = '<div id="divdisco'+key+'"></div>                    
                $('#discosplace').append(estehtml);
                //the div is generated... but when i do...:
                $(this).piegraph('divdisco'+key,'pie', response[3],0,1, "{label} #percent%","{label} ");
                //nothing happens
            });
        }
    });
}

```