How can i create a custom function in jquery?
I want to use that on text inputs, to check with trim, that the user really entered some text, or just white spaces.
How can i create a custom function in jquery?
I want to use that on text inputs, to check with trim, that the user really entered some text, or just white spaces.
You can use .trim() function.
if ($.trim($("input-selector").val()))
{
//do Something
}