Refresh home page if number of notes changes
This commit is contained in:
parent
6de5a44a1f
commit
b1248c80d8
@ -9,6 +9,9 @@ setInterval(function () {
|
|||||||
$.getJSON("action.php", {
|
$.getJSON("action.php", {
|
||||||
action: "getnotes"
|
action: "getnotes"
|
||||||
}, function (notes) {
|
}, function (notes) {
|
||||||
|
if ($(".notecard").length != notes.length) {
|
||||||
|
window.location.reload(true);
|
||||||
|
}
|
||||||
for (var i = 0; i < notes.length; i++) {
|
for (var i = 0; i < notes.length; i++) {
|
||||||
n = notes[i];
|
n = notes[i];
|
||||||
var notecard = $("#notecard_" + n['noteid']);
|
var notecard = $("#notecard_" + n['noteid']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user