How I Catch What Event While Action of Dynamic Child inside Dynamic Parent vice-versa : I am still not statisfy regarding Dynamic Child Inside Dynamic Parent where a lot of confusing for me and more worst how to know which once and how I can manipulate them to what I want.

For yours informations I am very very new on Javascript and Jquery, but I can catch up if someone give a right directions and a rights syntax. I love clean code where from that code I can learn more and understand.

Let say I have this structure html where it's same on firebugs:-

    <div name="div0" class="div0">
                         <input  name="txt0" class="txt0">
    	<div name="div1[]" class="divL1"> 'index 0
    		<button class="btn1">
                                                <button class="btn2">
                                                <input  name="txtL1_a[]" class="cLtxt1">
                                                <input  name="txtL1_b[]" class="cLtxt1">
                                                 < div name="div2[]" class="divL2">
                                                           <div id="ui-widget">
                                                           <input  name="txtL2_a[]" class="cLtxt2 autosuggest">
                                                           </div>
                                                          <input  name="txtL2_b[]" class="cLtxt2">
                                                </div>
    	</div>	
    	<div name="div1[]" class="divL1"> 'index 1
    		<button class="btn1">
                                                <button class="btn2">
                                                <input  name="txtL1_a[]" class="cLtxt1">
                                                <input  name="txtL1_b[]" class="cLtxt1">
                                                 < div name="div2[]" class="divL2">
                                                           <div id="ui-widget">
                                                           <input  name="txtL2_a[]" class="cLtxt2 autosuggest">
                                                           </div>
                                                          <input  name="txtL2_b[]" class="cLtxt2">
                                                </div>
    	</div>


Actually on my head have a lot of question but let me ask a few question first.

**1.** I want to run .autosuggest where it's complicated for me because on normal form before this I can manage run it, but when .autosuggest inside dynamic parent div and located on dynamic input I cannot get a value and show a autocomplete.

By given id "txtL2_a[]" function SearchText cannot performance autocomplete and don't know which index are doing that.

        function SearchText() {
            $(".autosuggest").autocomplete({
                source: function (request, response) {
                    $.ajax({
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        url: "frmsetuptrip.aspx/GetAutoCompleteData",
                        minLength: 3,
                        data: "{'presearch':'" + document.getElementById('txtL2_a[]').value + "'}",
                        dataType: "json",
                        success: function (data) {
                            if ((data.d).length == 0) {
                                //$('#button9').show();
                                var result = [
       {
           label: 'No matches found',
           value: response.term
       }
                                ];
                                response(result);
                            }
                            else {
                                response(data.d);
                            }
                        },
                        error: function (result) {
                            alert("Error");
                        }
                    });
                }
            });
        }



**2.** Let say on 

    <div name="div1[]" class="divL1"> //index 1

I need some auto fill up - let say when I fill up

    <input  name="txtL2_a[]" class="cLtxt2 autosuggest">  //index :1

automatically value inside

    <input  name="txtL2_b[]" class="cLtxt2"> 'Index 1

will change only based parents index.

**3.** There is anyway a one function where I can catch all event and elaborate that by IF before go specific sub function or task like this pseudo code below:-

        $("div.div0").each(function (event) {
        
        if (event=="keyup" on child=="divL1"+index[0]){
           //detect more spesific which object are doing that
            if (whoisdoing=="txtL1_a[]"+index[0] {
              //then do action etc: fill up parent input
              $("div0.txt0").val($(txtL1_a.index[0]).val());  
            }
            if (whoisdoing=="txtL1_b[]"+index[0] {
             //then do action etc: fill up childs input 
              $("div2[index[0]].txtL2_b[index[0]].val( $(txtL1_b[index[0]]).val() );
            }
        }
        
    //event - keypress
    
    //event - click
    
    //and many more
    
        }); 

I cannot find on internet regarding all this matter I mention above. If anybody have a solution or already develop that function please sharing and I believe this is not easy to handle.

Anyway thanks on advance to you for reading and replying my question.

Best Regards.