I am trying to find a way to trim spaces from the start and end of the title string. I was using this, but it doesn\'t seem to be working:
title = title.repl
When the DOM is fully loaded, you can add this to all the text fields. I have never had a situation where I needed to submit leading or trailing space, so doing it all the time globally has worked for me...
$(function() { $('input[type=text]').on('blur', function(){
$(this).val($.trim($(this).val()));
});
});