0

How do I reset an input field by clicking on a "refresh" glyphicon in Bootstrap 3?

Existing HTML:

<input type="email" placeholder="person@company.com" /><span class="fa fa-refresh"></span>
Jen
  • 156
  • 1
  • 3
  • 17

1 Answers1

1
$('.fa.fa-refresh').click(function(){
 $(this).prev().val('');
});
Rhea
  • 644
  • 1
  • 5
  • 14