jQuery Autotrim plugin. Enabling this plugin in context to certain input makes all content to be automatically trimmedas soon as it will be inserted inside that input.
Initialize plugin:
$('input').autotrim();
Destroy plugin:
$('input').autotrim('destroy');