title: Adding jQueryUI selectable items using AJAX
body: <p>I'm using some AJAX (ASP.NET Web Forms) to add new selectable elements on my site but the newly created ones aren't selectable. I guess this has to do with some events. Maybe it can be solved by using .on on those functions but I don't know how to do it. Anyone know how to fix that?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>$(".selectable").selectable({
  filter: '.ui-widget-content',
  stop: function () {
      var result = $("#select-result").empty();
      $(".ui-selected", this).each(function () {
          var index = $(this).attr('id');
          index = index.substring(12, index.length);
          result.append(" #" + index);
      });
  }
  });
  </code></pre>