From 3cd68c5331b7808a970c67119cdf9a7389b92cdb Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Fri, 29 Apr 2016 08:03:57 -0700 Subject: hide remove photo button before JS loads --- views/new-post.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/views/new-post.php b/views/new-post.php index 8e9c692..6ae4a17 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -28,9 +28,11 @@
-
+
@@ -139,15 +141,15 @@ $(function(){ var userHasSetCategory = false; - $("#photo_preview_container").hide(); + $("#photo_preview_container").addClass("hidden"); $("#note_photo").on("change", function(e){ - $("#photo_preview_container").show(); + $("#photo_preview_container").removeClass("hidden"); $("#photo_preview").attr("src", URL.createObjectURL(e.target.files[0]) ); }); $("#remove_photo").on("click", function(){ $("#note_photo").val(""); $("#photo_preview").attr("src", "" ); - $("#photo_preview_container").hide(); + $("#photo_preview_container").addClass("hidden"); }); $("#note_content").on('change keyup', function(e){ -- cgit v1.2.3