title: JQueryUI sortable only works once
body: <p>I calling JQueryUI.js in a page header then loading the content with AJAX. </p>
  
  <p>Jquery drag and drop works one time then quits working. If I JqueryUI.js with every AJAX content load it works, but that is extremely slow. This is in YII framework </p>
  
  <p>So the whole thing looks like :</p>
  
  <p>Page.php:</p>
  
  <pre><code>$cs-&gt;registerScriptFile($baseUrl . '/js/jquery.ui.js');
  $cs-&gt;registerScriptFile($baseUrl . '/js/product.js');
  </code></pre>
  
  <p>product.js: </p>
  
  <pre><code>// need to namespace this to get access to jquery.ui.js sortable function
  (function($) {
      SORTABLE = {
        mySortable: function(inputId) {
          $('#sortable-list-left').sortable();
          $('#sortable-list-right').sortable();
        }
       };
  }(jQuery));
  
  $(document)
    .ready(function() {
        function loadRecord(id, sku) {
        $.ajax({
          data: "id=" + id + "&amp;sku=" + sku + "&amp;project_id=" + urlParam("project"),
          url: "/product/ajaxGetRecord",
          type: "POST",
          success: function(response) {
            // process JSON response
            var obj = jQuery.parseJSON(response);
            // update the html with the new info
            $("#productForm")
              .html(obj.form);
            (function() {
              SORTABLE.mySortable(urlParam("project"));
            })();
          }
        });
     });
  </code></pre>
  
  <p>_pagePartial.php :</p>
  
  <pre><code> &lt;div id="productForm"&gt;  
      // dynamic content filled in here
   &lt;/div&gt; 
  </code></pre>
  
  <p>This namespacing strategy works for all my other JS, but doesn't work for Jquery.ui.js ... it applies the sortable method and I am able to drag and drop one time, but then it no longer works. </p>
  
  <p>The <strong>working</strong> option, which is not ideal, is:</p>
  
  <p>_pagePartial.php :</p>
  
  <pre><code>   // called every single ajax update ... ugh! 
     $cs-&gt;registerScriptFile($baseUrl . '/js/jquery.ui.js');
     $('#sortable-list-left').sortable();
     $('#sortable-list-right').sortable();
  </code></pre>