JQuery snippet - assistance required

Hello, I have added a custom html widget. I have been successful in adding formatting to a field which makes all characters lowercase.  $(".emailAddressInput").focus(); $(".emailAddressInput").children().css("text-transform", "lowercase"); This was great but now I need to trim out any spaces that may be entered. Using the .trim function I can use the entry as a string which I can be changed but I would need to change the above to accommodate this.  Any ideas on what code would be needed in this snippet to make all characters lower case AND remove any spaces entered? Thank you in advance :)
1 answers

You can use the .replace function which uses regex: 

$(".emailAddressInput").children().css("text-transform", "lowercase");

\s is regex for space