January 16 2013

Jquery Remove White Spacing

Tagged Under : ,


Use jQuery remove white space to avoid user escape required field.

There is one of the functions from jQuery which help to solve this problem.

You can use $.trim function to remove white space from the input box

Example:
//get the email value from input box.
var $email = $("input:text[name=email]").val();
//after that remove the white spacing.
var $remove = $.trim($email);

Make a Comment

You must be logged in to post a comment.