var saveSort = function() {
var avatarBox = J('.avatar-box'),
ids = new Array();
J.each(avatarBox, function(i,k) {
if (!J(k).hasClass('avatar-tmp'))
ids.push(k.id ? k.id.substr(5) : 0);
});
J.post('plugin.php?id=ccard:mycard&action=item_sort', 'sort='+ids.join(','), function(response) {
if (response.state) {
J('#sort_save').css('visibility', 'hidden');
} else {
alert(response.error || '请求异常');
}
}, 'json');
}
传回来的值有问题``麻烦解决一下
|