check if textbox is empty jquery

This method is useful if we want to consider a textbox with only whitespace as empty. The below rev2023.7.3.43523. like, It returns the value of a form element and undefined on an empty collection. jQuery Check if string empty or null