git clone https://github.com/qoozy/jquery-input-clear.git
Click the input area then the clear button will appear to reset the field.
See example.
<script src="jquery-clear-button.js"></script>
<input type="text" id="with-clearbtn" value="Click me">
<script type="text/javascript">
/**
* enabled jQuery Clear Button
*/
$('#with-clearbtn').jQueryClearButton();
</script>