diff options
author | raylu <raylu@mixpanel.com> | 2011-08-06 04:41:18 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-08-06 04:41:18 -0700 |
commit | 37867e1a046ccce45d7fd25e7034d6c061167457 (patch) | |
tree | bf3b0b48d9dc318e5649f2e7b438fbd3ebf5f91a | |
parent | 66e9baf1629a413ec0001dae57d40189dafe4f2f (diff) | |
download | audioaxis-37867e1a046ccce45d7fd25e7034d6c061167457.tar.xz |
removal shows on the page immediately
-rw-r--r-- | static/script.js | 8 |
1 files changed, 7 insertions, 1 deletions
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) { <a href="http://www.youtube.com/watch?v=' + id + '">' + title + '</a>\ </div>\ <div class="user">' + user + '</div>\ - <div class="remove">×</div>\ + <div class="remove" onclick="remove(\'' + id + '\')">×</div>\ <br class="clear">\ <div class="thumb">\ <img src="http://i.ytimg.com/vi/' + id + '/1.jpg" alt="' + 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(); + }); + } } ); } |