trim Function

Removes white space before and after the string. If "mode" is specified, "left" will only remove white space before the current innerHTML or value of the node, and "right" will only trim white space after the current innerHTML or value. Returns the handler.

Summary

ElementFunction
ReturnsObject

Arguments

modeboth|left|rightRemoval mode of white space. (default) both

Example

handler.trim('right');