You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
605 B

function removeDiff(id, html, id2) {
var wrapper= document.createElement('div');
wrapper.innerHTML = html;
var nodes = wrapper.childNodes;
target = document.getElementById(id);
if(target) {
for(i = 0; i < nodes.length; i++) {
var n = nodes[i];
// The notification is already here ?
if(document.getElementById(id2) == null) {
target.appendChild(n);
setTimeout(function() {
n.parentNode.removeChild(n);
},
6000);
}
}
}
}