how can i sequence the same click event of same object
<p>I have an object say list in my html page, </p>

<p>EDIT based on comment: Here is my XML </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Root&gt;
  &lt;Item&gt;
    &lt;Property_Cat_ID&gt;1&lt;/Property_Cat_ID&gt;
    &lt;Property_Cat_Name&gt;Buy&lt;/Property_Cat_Name&gt;
  &lt;/Item&gt;
  &lt;Item&gt;
    &lt;Property_Cat_ID&gt;2&lt;/Property_Cat_ID&gt;
    &lt;Property_Cat_Name&gt;Rent&lt;/Property_Cat_Name&gt;
  &lt;/Item&gt;
&lt;/Root&gt;
</code></pre>

<p>THIS IS HTML </p>

<pre><code>&lt;div class="ddpan01"&gt;
    &lt;div class="ddBoxHold"&gt;
          &lt;div class="ddBox"&gt;
                &lt;asp:TextBox ID="txtCat" runat="server" Value="Buy" ReadOnly="true"&gt;&lt;/asp:TextBox&gt;
                &lt;asp:HiddenField ID="hdnTypeId" runat="server" Value="0" /&gt;
                &lt;span&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="ddList"&gt;
               &lt;div class="ddListData"&gt;
                  &lt;ul&gt;
                  &lt;/ul&gt;
               &lt;/div&gt;
         &lt;/div&gt;
    &lt;/div&gt;
 &lt;/div&gt;
</code></pre>

<p>Script on page on DOM ready.</p>

<pre><code> $("div.ddpan01 div.ddBoxHold").find("div.ddList").find("div.ddListData ul li").click(function () {
            alert('click');
            getValues(0); // function which does dynamic value assigning work to all my fields
        })
 $.ajax({
            type: "GET",
            url: "/Admin/Includes/XML/PropertyCategory.xml",
            dataType: "xml",
            success: function (xml) {
                var count = 1;
                $(xml).find('Item').each(function () {
                    var id = $(this).find('Property_Cat_ID').text();
                    var name = $(this).find('Property_Cat_Name').text();
                    if (count == 1) {
                        $("div.tabdpan02").find("div.ddpan div.ddpan01 div.ddBoxHold div.ddBox input:first").val(name);
                        $("div.tabdpan02").find("div.ddpan div.ddpan01 div.ddBoxHold div.ddBox input:last").val(id);
                    }
                    $("&lt;li id=" + id + "&gt;&lt;/li&gt;").html(name).appendTo($("div.tabdpan02").find("div.ddpan div.ddpan01 div.ddBoxHold div.ddList div.ddListData ul"));
                    count++
                });
            }
        });
</code></pre>

<p>No in my head section of the Page we have called a file called effect.js which also has a click event. </p>

<p>below function is in effects.js file </p>

<pre><code> $(".ddListData ul li").live('click', function () {
        var htmlStr = $(this).html();
        var hId = $(this).attr('id');

        $(this).parent('ul').parent('div').parent('div').prev('.ddBox').find('input:first').val(htmlStr);
        $(this).parent('ul').parent('div').parent('div').prev('.ddBox').find('input:last').val(hId);
        $(this).parent('ul').parent('div').parent('div').hide(0);
    })
</code></pre>

<p>My question is which function will execute first and how can i call my  <code>getValues(0);</code> as click event after executing my effect.js click function, only.</p>

<p>I hope i am able to explain, my question, it is to big and complicated to write and explain here.</p>
