<div class="file-input"> <div class="attach-receipt"> <button type="button" class="js-attach">Attach Receipt</button> </div> <div class="remove-receipt is-hidden"> <button type="button" class="js-remove">Remove</button> Name of the Attached File </div> </div>
.is-hidden { display: none !important; } .file-input { background: #efefef; border: 1px solid #ccc; font-size: 0.7rem; font-family: sans-serif; padding: 0.5rem; width: 75%; }
$("button").on("click", function() { $(".file-input > div").toggleClass("is-hidden"); });