"Login With Show/Hide Password Feature"
Bootstrap 3.3.0 Snippet by Darshit1997

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container-fluid">
<div class="row">
<div class="well center-block">
<div class="well-header">
<center><img src="http://www.kisanpoint.com/mrb/includes/images/design_stuff/default_user_icon.png" class="img-thumbnail img-circle img-responsive" height="80px;" width="80px;"></center>
<h1 class="text-center" style="color: white;">Login</h1><hr>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">
<span class="glyphicon glyphicon-user"></span>
</div>
<input type="text" placeholder="User Name" id="uname" name="uname" class="form-control">
<div class="input-group-btn">
<button type="button" id="remove" data-val="1" class="btn btn-default btn-md"> <span class="glyphicon glyphicon-remove"></span></button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">
<span class="glyphicon glyphicon-lock"></span>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.well
{
padding: 35px;
padding-left: 30px;
box-shadow: 0 0 50px #666666;
margin: 7% auto 0;
width: 450px;
background: rgba(0.4, 0, 0, 0.4);
}
.btn1
{
background-color: #FF3838;
color: white;
transition: all 0.5s;
}
.btn1:hover, .btn1:focus
{
background-color: white;
color: black;
border: 1px solid;
border-color: #FF3838;
transition: 0.5s;
}
a:hover
{
text-decoration: none;
color: red;
}
body
{
background: url('http://cdn.pcwallart.com/images/nature-wallpapers-high-resolution-wallpaper-4.jpg');
}
.well-header
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(document).ready(function()
{
$("#showhide").click(function()
{
if ($(this).data('val') == "1")
{
$("#pwd").prop('type','text');
$("#eye").attr("class","glyphicon glyphicon-eye-close");
$(this).data('val','0');
}
else
{
$("#pwd").prop('type', 'password');
$("#eye").attr("class","glyphicon glyphicon-eye-open");
$(this).data('val','1');
}
});
});
$(document).ready(function()
{
$("#remove").click(function()
{
$("#uname").val('');
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: