function getRep(ar) {
res = [];
ar.forEach(el => {
el.forEach(a => {
res[a] = res[a] ? res[a]+1 : 1;
});
});
out = [];
res.forEach((el, i) => {if (el == ar.length) out.push(i);});
return out;
}
getRep([[1,2,3,4], [1,3,6,9], [1,3,9,10]]); // [1, 3]
$.ajax({ cache: false,
url: "/Admin/Contents/GetData",
data: { accountID: AccountID },
success: function (data) {
$('#CityID').html(data);
},
error:function (xhr, ajaxOptions, thrownError){
if(xhr.status==404) {
alert(thrownError);
}
}
});
var json = JSON.stringify({
'comments_text':comment,
'comments_post_id':1,
'comments_post': post});
post.comments_post_id = 1;
var json = JSON.stringify({
'comments_text':comment,
'comments_post': post});
function foo()
{
this.function baz(){
}
this.function bar()
{
$.ajax({
success: (html) =>
{
this.baz(); //<-- Как вызвать
}
});
}
}
$(".deletable").bind("DOMSubtreeModified", function() {
alert('DOMTree changed');
})