showing results for - "how to make a div appear onclick"
Jacob
25 Apr 2018
1<a class="btn btn-default log-bar" href="#" role="button" onclick="showDiv()">Login</a>
2
3
4<div id="sign-in" class="login" style="display: none;">
5  <form>
6    <div class="row">
7      <div class="col-md-3">
8        <div class="form-group inline-form">
9          <input type="email" class="form-control" id="email" Placeholder="email">
10        </div>
11      </div>
12      <div class="col-md-3">
13        <div class="form-group inline-form">
14          <input type="password" class="form-control" id="pwd">
15        </div>
16      </div>
17      <div class="col-md-3">
18        <div class="checkbox">
19          <label><input type="checkbox"> Remember me</label>
20        </div>
21      </div>
22      <div class="col-md-3">
23        <button type="submit" class="btn btn-default ">Submit</button>
24      </div>
25    </div>
26  </form>
27</div>
Makenzie
25 Mar 2017
1function showDiv() {
2  document.getElementById('sign-in').style.display = "block";
3}