I have a code use jQuery, and ajax
$.post(
'http://example.com', {
abc: $abc
},
function(data) {
$.post(
'http://example.com/123', {
cde: cde
},
function(data12) {
$.each($.parseJSON(data12), function(idx, obj) {
var $response = $(data);
$xyz = $response.filter('.abc[value="' + obj + '"]');
$xyz.remove();
console.log($xyz.html());
});
}
);
}
);
Expamle:
data =
<div class="abc" value="1"><span>abc</span></div>
<div class="abc" value="2"><span>def</span></div>
<div class="abc" value="3"><span>ghj</span></div>
<div class="abc" value="4"><span>xyz</span></div>
date12 = ["1","2"]
console = <span>abc</span> <span>def</span> <span>ghj</span> <span>xyz</span>
but the one I want is console = <span>ghj</span> <span>xyz</span>
The things I want is use jquery find and remmove something in ajax resposive and then save it.
Can anyone help me how to do please.