我想在我的页面上使用 jquery 和 ajax。我有 ajax 调用返回的 HTML 代码
function GetList() {
$.ajax({
url: "/List.asmx/List1",
type: "GET",
dataType: "json",
data: {
},
contentType: "application/Json; Charset= Utf-8",
success: function (data) {
var list = "";
$.each(data.d, function (index, item) {
list += '<div itemid=' + item.Nu + ' class="btn btn-default box">' + item.Name + '</div>';
});
$("#container1").html(list);
},
error: function (response) {
alert(response);
}
});
}
在这个 HTML 中,我有一个名为“box”的类和这个函数 jquery to use box
$('.box').draggable({
cursor: 'move',
helper: "clone"
});
这个类没有被jquery使用的问题,有人有什么建议吗?
呼如林
相关分类