Use jQuery's trim

Avoid using native trim as we would have to polyfill it.
Since this is a jQuery plugin we can safely use the jQuery polyfill.