From 900a633288df38db34a0f8dc8ead8f1820afd064 Mon Sep 17 00:00:00 2001 From: Josh Williams Date: Fri, 4 Oct 2013 10:21:58 -0400 Subject: [PATCH] Add remove class to X button, move click handler --- karmaworld/templates/partial/filepicker.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/karmaworld/templates/partial/filepicker.html b/karmaworld/templates/partial/filepicker.html index d4b07de..1c3618e 100644 --- a/karmaworld/templates/partial/filepicker.html +++ b/karmaworld/templates/partial/filepicker.html @@ -43,7 +43,7 @@ placeholder="shakespeare, econ, physics">
- +
- +
@@ -90,6 +90,12 @@ $(_form.children[0].children[3].children[1]).val(upFile.mimetype); document.getElementById('forms_container').appendChild(_form); + + $('.remove').on('click', function(e){ + e.stopPropagation(); + console.log($(this).parent().parent()); + $(this).parent().parent().remove(); + }); }; var fileup = document.getElementById('filepicker-file-upload'); @@ -182,11 +188,6 @@ }); }); - $('.remove').on('click', function(e){ - e.stopPropagation(); - console.log($(this).parent().parent()); - $(this).parent().parent().remove(); - }); }); // FIXME: Style and arrange everything -- 2.25.1