title: JavaScript on jQuery created code never gets called
body: <p>This is my view in ASP.NET MVC.</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Administration.Master" Inherits="System.Web.Mvc.ViewPage" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server"&gt;
      &lt;script type="text/javascript"&gt;
  
          var ddlContentTypes;
  
          $(document).ready(function () {
              ddlContentTypes = $("#ContentTypes");
              ddlContentTypes.bind("change", loadCreate);
              loadCreate();
          });
  
          function loadCreate() {
              var typeId = $("#ContentTypes option:selected").val();
              $.get('~/' + typeId + '/Create', function (data) {
                  $("#CreateForm").html(data);
              });
              $("fieldset input").each(function (index, item) {
                  $(item).attr("disabled", true);
              });
          }
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"&gt;
      &lt;h2&gt;
          &lt;%=Resources.Localize.CreateWidget %&gt;&lt;/h2&gt;
      &lt;p&gt;
          &lt;% Html.RenderPartial("ContentTypeSelector"); %&gt;&lt;/p&gt;
      &lt;div id="CreateForm"&gt;
      &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>As you can see, it loads some HTML (actually user control) and adds it to the CreateForm div. This actually works fine.</p>
  
  <p>The problem is this</p>
  
  <pre><code>$("fieldset input").each(function (index, item) {
                  $(item).attr("disabled", true);
              });
  </code></pre>
  
  <p>never runs. The <strong>fieldset</strong> tag is in the response, so you don't see it here but it's there - everything is returned back fine (I checked with Firebug).</p>
  
  <p>Why do the above two lines of JS never run or have any effect?</p>