From 37867e1a046ccce45d7fd25e7034d6c061167457 Mon Sep 17 00:00:00 2001 From: raylu Date: Sat, 6 Aug 2011 04:41:18 -0700 Subject: removal shows on the page immediately --- static/script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index c9d3c40..81d7fc5 100644 --- a/static/script.js +++ b/static/script.js @@ -156,7 +156,7 @@ function add(id, title) { ' + title + '\ \
' + user + '
\ -
×
\ +
×
\
\
\ ' + id + '\ @@ -183,6 +183,12 @@ function remove(id) { } $.getJSON('/remove/', params, function(data) { + if (data == 1) { + var element = $('#' + id); + element.slideUp(100, function() { + element.remove(); + }); + } } ); } -- cgit v1.2.3