"Expanding Search input"
Bootstrap 3.3.0 Snippet by iammahesh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<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">
<div class="row">
<div class="col-md-12">
<div class="jumbotron">
<h2>Expanding Search input</h2>
<p><small class="text-muted">Click Search input and Expanding input</small></p>
<input class="form-control input-lg" id="myInput" placeholder="Searchin text" type="text">
</div>
</div>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
#myInput {
width:30%;
-webkit-transition:width 0.3s ease-in-out;
}
#myInput:focus {
width:100%;
-webkit-transition:width 0.5s ease-in-out;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: