title: Javascript in update panel doesn't work after partial postback
body: <pre><code> &lt;script type="text/javascript"&gt;
          $(function () {
              $('.datePicker').datetimepicker({ dateFormat: 'dd/mm/yy' });
          });
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server"&gt;
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
      &lt;/asp:ScriptManager&gt;
      &lt;asp:TextBox ID="TextBox1" class="datePicker" runat="server"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:UpdatePanel ID="holder" runat="server" UpdateMode="Always" ChildrenAsTriggers="true"&gt;
          &lt;ContentTemplate&gt;
              &lt;asp:DropDownList runat="server" ID="ddl_RespondBy" AutoPostBack="true" OnSelectedIndexChanged="ddl_SelectedIndexChanged"&gt;
                  &lt;asp:ListItem Selected="True"&gt;1 Hour&lt;/asp:ListItem&gt;
                  &lt;asp:ListItem&gt;Other&lt;/asp:ListItem&gt;
              &lt;/asp:DropDownList&gt;
              &lt;asp:TextBox ID="txt_RespondBy" class="datePicker" Visible="true" runat="server" /&gt;
          &lt;/ContentTemplate&gt;
          &lt;Triggers&gt;
              &lt;asp:AsyncPostBackTrigger ControlID="ddl_RespondBy" EventName="SelectedIndexChanged" /&gt;
          &lt;/Triggers&gt;
      &lt;/asp:UpdatePanel&gt;
  &lt;/asp:Content&gt;
  
  protected void ddl_SelectedIndexChanged(object sender, EventArgs e)
      {
          if (ddl_RespondBy.SelectedItem.Text == "Other")
          {
              txt_RespondBy.Visible = true;
          }
          else
          {
  
          }
      }
  </code></pre>
  
  <p>I do partial post back with the update panel, I have two text box one outside update panel and one inside, when I select other from the dropdown and try to open the calendar inside the txt_RespondBy text box it doesn't show, but the text box outside update panel shows the calendar. why is Javascript not working inside update panel after partial postback</p>