fixed bug on IE.

replaced `.trim()` as regex.
replaced `label.remove()` as `$(label).remove()`