Reputation: 407
I have the following code that produces this:
<div class='input-group manualInput'>
<input id='address-input' type='text' class='form-control' placeholder='Enter your current location!'/>
<span class='input-group-addon'>
<i class='glyphicon glyphicon-search'></i>
</span>
</div>
How do I make the glyphicon clickable? And call a JS function
Upvotes: 3
Views: 9998
Reputation: 133400
Add a JavaScript onClick
event like this:
<span class='input-group-addon'>
<i class='glyphicon glyphicon-search' onclick="myfunction();"></i>
</span>
Upvotes: 6
Reputation: 422
Right off their website:
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div><!-- /input-group -->
Upvotes: 0