String.trim() --> $.trim()

Replaced String.trim() with IE8-compatible $.trim()