if (activeNote) {
$('#' + activeNote)[0].children[0].innerHTML = title;
$('#' + activeNote)[0].children[1].innerHTML = created.toLocaleString("en-US");
$('#' + activeNote)[0].children[2].innerHTML = body;
$('#' + activeNote)[0].style.backgroundColor = color;
activeNote = null;
}
$('#listed').append('<div id="note' + id + '" style="background-color: ' + color + '"><div class="list-title">' + title + '</div> <div class="list-date">' + created.toLocaleString("en-US") + '</div> <div class="list-text">' + body + '</div> </div>');
if (activeNote) {
/**/$('#' + activeNote)[0].remove();
activeNote = null;}
var titleSel = $('#' + id)[0].children[0].innerHTML;
var bodySel = $('#' + id)[0].children[2].innerHTML;
if (activeNote) {
const note = document.getElementById(activeNote)
note.children[0].innerHTML = title;
note.children[1].innerHTML = created.toLocaleString("en-US");
note.children[2].innerHTML = body;
note.style.backgroundColor = color;
activeNote = null;
}
document.getElementById('listed')
.append(document.createTextNode(title + ' ' + created.toLocaleString("en-US") + ' ' + body + ' '));
if (activeNote) {
let note = document.getElementById(activeNote);
note.parentElement.removeChild(note);
activeNote = null;
}
if (activeNote) {
const node = document.querySelector(`#${activeNote}`);
node.children[0].innerHTML = title;
node.children[1].innerHTML = created.toLocaleString('en-US');
node.children[2].innerHTML = body;
node.style.backgroundColor = color;
activeNote = null;
}
const node = document.querySelector('#listed');
node.appendChild(document.createTextNode(`${title} ${created.toLocaleString('en-US')} ${body} `));
if (activeNote) {
const node = document.querySelector(`#${activeNote}`);
node.parentNode.removeChild(node);
activeNote = null;
}
const nodes = document.querySelector(`#${id}`);
const titleSel = nodes.children[0].innerHTML;
const bodySel = nodes.children[2].innerHTML;