javascript: How to hide or remove element using raw javascript like google keep?

Viewed 182

I'm trying to create google keep input text, when I clicked inside input text, input title and button create are showing, how to hide them back when I click outside input text?

heres' my version :

    <input type="text" class="input-style target" style="display: none;" name="input-title" placeholder="TITLE">
<div class="form-group">
  <input type="text" id="inputNote" class="input-style" name="input-note" placeholder="note">
</div>
<div class="btn-action">
  <button class="btn-style target" style="display: none;">CREATE</button>
</div>

more visit:jsfiddle

1 Answers
Related