我正在使用一些 AJAX(ASP.NET Web 窗体)在我的网站上添加新的可选择元素,但新创建的元素不可选择。我想这与某些事件有关。也许可以通过在这些功能上使用 .on 来解决,但我不知道该怎么做。有谁知道如何解决这个问题?
这是我的代码:
$(".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);
});
}
});